From: Simon Morlat Date: Fri, 22 Mar 2013 09:58:25 +0000 (+0100) Subject: fix previous commit. X-Git-Url: http://sjero.net/git/?p=linphone;a=commitdiff_plain;h=76e61b810d069db36232ede60cf507327b231fba fix previous commit. --- diff --git a/coreapi/misc.c b/coreapi/misc.c index 158ab0ad..73876674 100644 --- a/coreapi/misc.c +++ b/coreapi/misc.c @@ -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;