From e4030f398d69b400a26ac751283470e6bb6be2a2 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Tue, 20 Apr 2010 14:08:07 +0200 Subject: [PATCH] fix sigsegv --- coreapi/misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coreapi/misc.c b/coreapi/misc.c index 41ca8d0bc..ae5414de6 100644 --- a/coreapi/misc.c +++ b/coreapi/misc.c @@ -750,6 +750,7 @@ int linphone_core_get_local_ip_for(int type, const char *dest, char *result){ dest="87.98.157.38"; /*a public IP address*/ else dest="2a00:1450:8002::68"; } + strcpy(result,type==AF_INET ? "127.0.0.1" : "::1"); #ifdef HAVE_GETIFADDRS { int found_ifs; @@ -759,7 +760,6 @@ int linphone_core_get_local_ip_for(int type, const char *dest, char *result){ return 0; }else if (found_ifs<=0){ /*absolutely no network on this machine */ - strcpy(result,type==AF_INET ? "127.0.0.1" : "::1"); return -1; } }