]> sjero.net Git - linphone/commitdiff
Do not try to refresh register if network isnot reachable
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@linphone.org>
Wed, 8 Feb 2012 16:33:17 +0000 (17:33 +0100)
committerPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@linphone.org>
Wed, 8 Feb 2012 16:34:02 +0000 (17:34 +0100)
coreapi/linphonecore.c

index b4412e0a8551cc31cec3fe9db26cdc4fb5a97d86..0b200a42b66c9ded7e73d41a9bf09e074831012f 100644 (file)
@@ -4179,7 +4179,12 @@ static void set_network_reachable(LinphoneCore* lc,bool_t isReachable, time_t cu
 }
 
 void linphone_core_refresh_registers(LinphoneCore* lc) {
-       const MSList *elem=linphone_core_get_proxy_config_list(lc);
+       const MSList *elem;
+       if (!lc->network_reachable) {
+               ms_warning("Refresh register operation not available (network unreachable)");
+               return;
+       }
+       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) ) {