mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-04-28 13:56:21 +00:00
linphonecore.c: fix log collection
This commit is contained in:
parent
2cab9fe981
commit
4bef511e53
1 changed files with 3 additions and 3 deletions
|
|
@ -169,7 +169,7 @@ const LinphoneAddress *linphone_core_get_current_call_remote_address(struct _Lin
|
||||||
static void linphone_core_log_collection_handler(const char *domain, OrtpLogLevel level, const char *fmt, va_list args);
|
static void linphone_core_log_collection_handler(const char *domain, OrtpLogLevel level, const char *fmt, va_list args);
|
||||||
|
|
||||||
void linphone_core_set_log_handler(OrtpLogFunc logfunc) {
|
void linphone_core_set_log_handler(OrtpLogFunc logfunc) {
|
||||||
if (ortp_logv_out == linphone_core_log_collection_handler) {
|
if (ortp_get_log_handler() == linphone_core_log_collection_handler) {
|
||||||
ms_message("There is already a log collection handler, keep it");
|
ms_message("There is already a log collection handler, keep it");
|
||||||
liblinphone_log_func = logfunc;
|
liblinphone_log_func = logfunc;
|
||||||
} else
|
} else
|
||||||
|
|
@ -389,7 +389,7 @@ void linphone_core_enable_log_collection(LinphoneLogCollectionState state) {
|
||||||
/* at first call of this function, set liblinphone_log_func to the current
|
/* at first call of this function, set liblinphone_log_func to the current
|
||||||
* ortp log function */
|
* ortp log function */
|
||||||
if( liblinphone_log_func == NULL ){
|
if( liblinphone_log_func == NULL ){
|
||||||
liblinphone_log_func = ortp_logv_out;
|
liblinphone_log_func = ortp_get_log_handler();
|
||||||
}
|
}
|
||||||
liblinphone_log_collection_state = state;
|
liblinphone_log_collection_state = state;
|
||||||
if (state != LinphoneLogCollectionDisabled) {
|
if (state != LinphoneLogCollectionDisabled) {
|
||||||
|
|
@ -397,7 +397,7 @@ void linphone_core_enable_log_collection(LinphoneLogCollectionState state) {
|
||||||
if (state == LinphoneLogCollectionEnabledWithoutPreviousLogHandler) {
|
if (state == LinphoneLogCollectionEnabledWithoutPreviousLogHandler) {
|
||||||
liblinphone_log_func = NULL;
|
liblinphone_log_func = NULL;
|
||||||
} else {
|
} else {
|
||||||
liblinphone_log_func = ortp_logv_out;
|
liblinphone_log_func = ortp_get_log_handler();
|
||||||
}
|
}
|
||||||
ortp_set_log_handler(linphone_core_log_collection_handler);
|
ortp_set_log_handler(linphone_core_log_collection_handler);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue