]> sjero.net Git - linphone/commitdiff
Merge branch 'master' of git.sv.gnu.org:/srv/git/linphone
authorJehan Monnier <jehan.monnier@linphone.org>
Thu, 17 Feb 2011 16:41:56 +0000 (17:41 +0100)
committerJehan Monnier <jehan.monnier@linphone.org>
Thu, 17 Feb 2011 16:41:56 +0000 (17:41 +0100)
coreapi/linphonecore.c
coreapi/linphonecore.h
coreapi/sal_eXosip2.c

index 9156fe40ee8d9927a2d8e82eb5e740dde16d5f5f..7b6a01640f783df256b1f55773cd3f4a7db7da7c 100644 (file)
@@ -3919,8 +3919,24 @@ static void set_network_reachable(LinphoneCore* lc,bool_t isReachable, time_t cu
        }
        lc->netup_time=curtime;
        lc->network_reachable=isReachable;
-}
+       if(!isReachable) {
+               sal_unlisten_ports (lc->sal);
+       } else {
+               apply_transports(lc);
+       }
 
+}
+void linphone_core_refresh_registers(LinphoneCore* lc) {
+       const MSList *elem=linphone_core_get_proxy_config_list(lc);
+       for(;elem!=NULL;elem=elem->next){
+               LinphoneProxyConfig *cfg=(LinphoneProxyConfig*)elem->data;
+               if (linphone_proxy_config_register_enabled(cfg) ) {
+                       cfg->registered=0;
+                       cfg->commit=TRUE;
+               }
+       }
+       
+}
 void linphone_core_set_network_reachable(LinphoneCore* lc,bool_t isReachable) {
        //first disable automatic mode
        if (lc->auto_net_state_mon) {
index 82709208d587ef5145621a8211a494bfa08e3fec..81ab3e949948770cfd2d3446fb0b07d20f8c747d 100644 (file)
@@ -972,7 +972,11 @@ int linphone_core_get_current_call_stats(LinphoneCore *lc, rtp_stats_t *local, r
 const MSList *linphone_core_get_calls(LinphoneCore *lc);
 
 LinphoneGlobalState linphone_core_get_global_state(const LinphoneCore *lc);
-
+/**
+ * force registration refresh to be initiated upon next iterate
+ * @ingroup proxies
+ */
+void linphone_core_refresh_registers(LinphoneCore* lc);        
 #ifdef __cplusplus
 }
 #endif
index bb098fbe961e6512de73021c2cbd1ef8dcaa0e18..6f2fd8bb12e489945262a149887257528fbe63f9 100644 (file)
@@ -331,6 +331,7 @@ int sal_unlisten_ports(Sal *ctx){
        if (ctx->running){
                eXosip_quit();
                eXosip_init();
+               ctx->running=FALSE;
        }
        return 0;
 }