From 606d3c0a25c0134836eae78ac142ddb05dc4be38 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Fri, 22 Mar 2013 11:00:23 +0100 Subject: [PATCH] fix again --- coreapi/misc.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/coreapi/misc.c b/coreapi/misc.c index 738766746..26cdbe224 100644 --- a/coreapi/misc.c +++ b/coreapi/misc.c @@ -1125,18 +1125,17 @@ int linphone_core_get_local_ip_for(int type, const char *dest, char *result){ * try to find 'the' running interface with getifaddrs*/ #ifdef HAVE_GETIFADDRS - if (dest==NULL) { - /*we use getifaddrs for lookup of default interface */ - int found_ifs; - found_ifs=get_local_ip_with_getifaddrs(type,result,LINPHONE_IPADDR_SIZE); - if (found_ifs==1){ - return 0; - }else if (found_ifs<=0){ - /*absolutely no network on this machine */ - return -1; - } - } + /*we use getifaddrs for lookup of default interface */ + int found_ifs; + + found_ifs=get_local_ip_with_getifaddrs(type,result,LINPHONE_IPADDR_SIZE); + if (found_ifs==1){ + return 0; + }else if (found_ifs<=0){ + /*absolutely no network on this machine */ + return -1; + } #endif return 0; }