Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
liblinphone
Commits
41545fad
Commit
41545fad
authored
Jan 07, 2016
by
François Grisez
Browse files
Fixes conflicts between François and Ghislain's "internal" parameter of vtables
parent
38dfb9ab
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
17 deletions
+4
-17
coreapi/linphonecore.c
coreapi/linphonecore.c
+2
-3
coreapi/linphonecore.h
coreapi/linphonecore.h
+0
-1
coreapi/private.h
coreapi/private.h
+0
-3
coreapi/vtables.c
coreapi/vtables.c
+2
-10
No files found.
coreapi/linphonecore.c
View file @
41545fad
...
...
@@ -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
,
TRU
E
);
_linphone_core_add_listener
(
lc
,
local_vtable
,
TRUE
,
FALS
E
);
linphone_core_set_state
(
lc
,
LinphoneGlobalStartup
,
"Starting up"
);
ortp_init
();
...
...
coreapi/linphonecore.h
View file @
41545fad
...
...
@@ -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 associated with the above callbacks */
bool_t
internal
;
}
LinphoneCoreVTable
;
/**
...
...
coreapi/private.h
View file @
41545fad
...
...
@@ -1412,9 +1412,6 @@ typedef struct _VTableReference VTableReference;
void
v_table_reference_destroy
(
VTableReference
*
ref
);
LINPHONE_PUBLIC
void
linphone_core_v_table_set_internal
(
LinphoneCoreVTable
*
table
,
bool_t
internal
);
bool_t
linphone_core_v_table_is_internal
(
LinphoneCoreVTable
*
table
);
void
_linphone_core_add_listener
(
LinphoneCore
*
lc
,
LinphoneCoreVTable
*
vtable
,
bool_t
autorelease
,
bool_t
internal
);
#ifdef VIDEO_ENABLED
...
...
coreapi/vtables.c
View file @
41545fad
...
...
@@ -33,14 +33,6 @@ void* linphone_core_v_table_get_user_data(LinphoneCoreVTable *table) {
return
table
->
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;\
}\
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment