mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-23 06:08:07 +00:00
Add API to reset the log collection.
This commit is contained in:
parent
672b833665
commit
d60890107a
2 changed files with 20 additions and 0 deletions
|
|
@ -516,6 +516,19 @@ char * linphone_core_compress_log_collection(LinphoneCore *core) {
|
|||
return ms_strdup_printf("%s/%s", liblinphone_log_collection_path ? liblinphone_log_collection_path : ".", COMPRESSED_LOG_COLLECTION_FILENAME);
|
||||
}
|
||||
|
||||
void linphone_core_reset_log_collection(LinphoneCore *core) {
|
||||
char *filename;
|
||||
ortp_mutex_lock(&liblinphone_log_collection_mutex);
|
||||
delete_log_collection_upload_file();
|
||||
filename = ms_strdup_printf("%s/%s", liblinphone_log_collection_path ? liblinphone_log_collection_path : ".", "linphone1.log");
|
||||
unlink(filename);
|
||||
ms_free(filename);
|
||||
filename = ms_strdup_printf("%s/%s", liblinphone_log_collection_path ? liblinphone_log_collection_path : ".", "linphone2.log");
|
||||
unlink(filename);
|
||||
ms_free(filename);
|
||||
ortp_mutex_unlock(&liblinphone_log_collection_mutex);
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable logs in supplied FILE*.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1817,6 +1817,13 @@ LINPHONE_PUBLIC void linphone_core_upload_log_collection(LinphoneCore *core);
|
|||
*/
|
||||
LINPHONE_PUBLIC char * linphone_core_compress_log_collection(LinphoneCore *core);
|
||||
|
||||
/**
|
||||
* Reset the log collection by removing the log files.
|
||||
* @ingroup misc
|
||||
* @param[in] core LinphoneCore object
|
||||
*/
|
||||
LINPHONE_PUBLIC void linphone_core_reset_log_collection(LinphoneCore *core);
|
||||
|
||||
/**
|
||||
* Define a log handler.
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue