diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index de27eaa38..78ce379fd 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -1686,7 +1686,6 @@ static void linphone_core_init(LinphoneCore * lc, const LinphoneCoreVTable *vtab LinphoneCoreVTable* local_vtable= linphone_core_v_table_new(); LinphoneCoreVTable *internal_vtable = linphone_core_v_table_new(); - linphone_core_v_table_set_internal(internal_vtable, TRUE); ms_message("Initializing LinphoneCore %s", linphone_core_get_version()); lc->config=lp_config_ref(config); @@ -1696,9 +1695,9 @@ static void linphone_core_init(LinphoneCore * lc, const LinphoneCoreVTable *vtab linphone_task_list_init(&lc->hooks); internal_vtable->notify_received = linphone_core_internal_notify_received; - _linphone_core_add_listener(lc, internal_vtable, TRUE); + _linphone_core_add_listener(lc, internal_vtable, TRUE, TRUE); memcpy(local_vtable,vtable,sizeof(LinphoneCoreVTable)); - _linphone_core_add_listener(lc, local_vtable, TRUE, TRUE); + _linphone_core_add_listener(lc, local_vtable, TRUE, FALSE); linphone_core_set_state(lc,LinphoneGlobalStartup,"Starting up"); ortp_init(); diff --git a/coreapi/linphonecore.h b/coreapi/linphonecore.h index f42930fc4..d28540df4 100644 --- a/coreapi/linphonecore.h +++ b/coreapi/linphonecore.h @@ -2108,7 +2108,6 @@ typedef struct _LinphoneCoreVTable{ LinphoneCoreLogCollectionUploadStateChangedCb log_collection_upload_state_changed; /**< Callback to upload collected logs */ LinphoneCoreLogCollectionUploadProgressIndicationCb log_collection_upload_progress_indication; /**< Callback to indicate log collection upload progress */ void *user_data; /**user_data; } -void linphone_core_v_table_set_internal(LinphoneCoreVTable *table, bool_t internal) { - table->internal = internal; -} - -bool_t linphone_core_v_table_is_internal(LinphoneCoreVTable *table) { - return table->internal; -} - void linphone_core_v_table_destroy(LinphoneCoreVTable* table) { ms_free(table); } @@ -74,12 +66,12 @@ static void cleanup_dead_vtable_refs(LinphoneCore *lc){ }\ if (has_cb) ms_message("Linphone core [%p] notifying [%s]",lc,#function_name) -#define NOTIFY_IF_EXIST_INTERNAL(function_name, internal, ...) \ +#define NOTIFY_IF_EXIST_INTERNAL(function_name, internal_val, ...) \ MSList* iterator; \ VTableReference *ref; \ bool_t has_cb = FALSE; \ for (iterator=lc->vtable_refs; iterator!=NULL; iterator=iterator->next)\ - if ((ref=(VTableReference*)iterator->data)->valid && (lc->current_vtable=ref->vtable)->function_name && (linphone_core_v_table_is_internal(lc->current_vtable) == internal)) {\ + if ((ref=(VTableReference*)iterator->data)->valid && (lc->current_vtable=ref->vtable)->function_name && (ref->internal == internal_val)) {\ lc->current_vtable->function_name(__VA_ARGS__);\ has_cb = TRUE;\ }\