mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-23 06:08:07 +00:00
Fix logs disable when linphone_core_enable_log_collection is called with FALSE at app start
This commit is contained in:
parent
891010b78a
commit
0c124c486e
1 changed files with 6 additions and 1 deletions
|
|
@ -173,7 +173,7 @@ static void linphone_core_log_collection_handler(OrtpLogLevel level, const char
|
|||
char *log_filename2;
|
||||
FILE *log_file;
|
||||
struct timeval tp;
|
||||
struct tm *lt;
|
||||
struct tm *lt;
|
||||
time_t tt;
|
||||
struct stat statbuf;
|
||||
|
||||
|
|
@ -251,6 +251,11 @@ void linphone_core_set_log_collection_upload_server_url(LinphoneCore *core, cons
|
|||
}
|
||||
|
||||
void linphone_core_enable_log_collection(bool_t enable) {
|
||||
/* at first call of this function, set liblinphone_log_func to the current
|
||||
* ortp log function */
|
||||
if( liblinphone_log_func == NULL ){
|
||||
liblinphone_log_func = ortp_logv_out;
|
||||
}
|
||||
if ((enable == TRUE) && (liblinphone_log_collection_enabled == FALSE)) {
|
||||
liblinphone_log_collection_enabled = TRUE;
|
||||
ortp_mutex_init(&liblinphone_log_collection_mutex, NULL);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue