Commit 645619e8 authored by Erwan Croze's avatar Erwan Croze 👋🏻

Moving sal creation in linphone core init

parent 01294c1b
......@@ -2237,6 +2237,14 @@ static void linphone_core_init(LinphoneCore * lc, LinphoneCoreCbs *cbs, LpConfig
lc->data=userdata;
lc->ringstream_autorelease=TRUE;
// We need the Sal on the Android platform helper init
lc->sal=new Sal(lc->factory);
lc->sal->set_http_proxy_host(linphone_core_get_http_proxy_host(lc));
lc->sal->set_http_proxy_port(linphone_core_get_http_proxy_port(lc));
lc->sal->set_user_pointer(lc);
lc->sal->set_callbacks(&linphone_sal_callbacks);
#ifdef __ANDROID__
if (system_context)
lc->platform_helper = LinphonePrivate::createAndroidPlatformHelpers(lc, system_context);
......@@ -2272,13 +2280,6 @@ static void linphone_core_init(LinphoneCore * lc, LinphoneCoreCbs *cbs, LpConfig
/* This allows to run event's callback in linphone_core_iterate() */
lc->msevq=ms_factory_create_event_queue(lc->factory);
lc->sal=new Sal(lc->factory);
lc->sal->set_http_proxy_host(linphone_core_get_http_proxy_host(lc));
lc->sal->set_http_proxy_port(linphone_core_get_http_proxy_port(lc));
lc->sal->set_user_pointer(lc);
lc->sal->set_callbacks(&linphone_sal_callbacks);
#ifdef TUNNEL_ENABLED
lc->tunnel=linphone_core_tunnel_new(lc);
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment