mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-02-07 14:18:25 +00:00
avoid log handler removal in case of subsequence call to linphone_core_set_log_handler
This commit is contained in:
parent
7942e7e60a
commit
d107a069ed
1 changed files with 6 additions and 2 deletions
|
|
@ -154,7 +154,11 @@ const LinphoneAddress *linphone_core_get_current_call_remote_address(struct _Lin
|
|||
}
|
||||
|
||||
void linphone_core_set_log_handler(OrtpLogFunc logfunc) {
|
||||
ortp_set_log_handler(logfunc);
|
||||
if (ortp_logv_out == linphone_core_log_collection_handler) {
|
||||
ms_message("There is already a log collection handler, keep it");
|
||||
liblinphone_log_func = logfunc;
|
||||
} else
|
||||
ortp_set_log_handler(logfunc);
|
||||
}
|
||||
|
||||
void linphone_core_set_log_file(FILE *file) {
|
||||
|
|
@ -645,7 +649,7 @@ void linphone_core_enable_logs(FILE *file){
|
|||
**/
|
||||
void linphone_core_enable_logs_with_cb(OrtpLogFunc logfunc){
|
||||
ortp_set_log_level_mask(ORTP_MESSAGE|ORTP_WARNING|ORTP_ERROR|ORTP_FATAL);
|
||||
ortp_set_log_handler(logfunc);
|
||||
linphone_core_set_log_handler(logfunc);
|
||||
sal_enable_logs();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue