void log_enable(uint8_t *name, uint8_t *key, struct chatlog *log) { log->log_on = true; if (log->file == NULL) init_logging_session(name, key, log); }
void log_enable(char *name, const char *selfkey, const char *otherkey, struct chatlog *log, int logtype) { log->log_on = true; if (log->file != NULL) return; if (init_logging_session(name, selfkey, otherkey, log, logtype) == -1) log_disable(log); }