From 9d7a94303299097d464c0d82fcdfc2654809ebb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20Turnel?= Date: Tue, 6 Mar 2018 17:04:16 +0100 Subject: [PATCH] Add reconnect_to_primary_asap parameter to linphonerc and pass it to belle_sip_stack --- coreapi/linphonecore.c | 3 +++ src/sal/sal.h | 1 + 2 files changed, 4 insertions(+) diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index cc85eb679..40de59c18 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -1395,6 +1395,9 @@ static void sip_config_read(LinphoneCore *lc) { /*this is to filter out unsupported encryption schemes*/ linphone_core_set_media_encryption(lc,linphone_core_get_media_encryption(lc)); + /*enable the reconnection to the primary server when it is up again asap*/ + lc->sal->enable_reconnect_to_primary_asap(!!lp_config_get_int(lc->config,"sip","reconnect_to_primary_asap",0)); + /*for tuning or test*/ lc->sip_conf.sdp_200_ack = !!lp_config_get_int(lc->config,"sip","sdp_200_ack",0); lc->sip_conf.register_only_when_network_is_up= diff --git a/src/sal/sal.h b/src/sal/sal.h index bf9322d48..3e48bc481 100644 --- a/src/sal/sal.h +++ b/src/sal/sal.h @@ -171,6 +171,7 @@ public: void enable_test_features(bool_t enabled) {this->_enable_test_features=enabled;} void use_no_initial_route(bool_t enabled) {this->no_initial_route=enabled;} void enable_unconditional_answer(int value) {belle_sip_provider_enable_unconditional_answer(this->prov,value);} + void enable_reconnect_to_primary_asap(bool_t enabled) {belle_sip_stack_enable_reconnect_to_primary_asap(this->stack,enabled);} bctbx_list_t *get_pending_auths() const {return bctbx_list_copy(this->pending_auths);} -- 2.21.0