]> sjero.net Git - linphone/commitdiff
fix previous commit.
authorSimon Morlat <simon.morlat@linphone.org>
Fri, 22 Mar 2013 09:58:25 +0000 (10:58 +0100)
committerSimon Morlat <simon.morlat@linphone.org>
Fri, 22 Mar 2013 09:58:25 +0000 (10:58 +0100)
coreapi/misc.c

index 158ab0add55cff9f87427ad50a667b4edfd7ffc9..738766746092c25d654c21a99b573d6212335616 100644 (file)
@@ -1113,9 +1113,11 @@ int linphone_core_get_local_ip_for(int type, const char *dest, char *result){
        int err;
         strcpy(result,type==AF_INET ? "127.0.0.1" : "::1");
        
-       if (type==AF_INET)
-                dest="87.98.157.38"; /*a public IP address*/
-        else dest="2a00:1450:8002::68";
+       if (dest==NULL){
+               if (type==AF_INET)
+                       dest="87.98.157.38"; /*a public IP address*/
+               else dest="2a00:1450:8002::68";
+       }
         err=get_local_ip_for_with_connect(type,dest,result);
        if (err==0) return 0;