mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-23 14:18:07 +00:00
fix again
This commit is contained in:
parent
b37cdb6783
commit
606d3c0a25
1 changed files with 10 additions and 11 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue