Mercurial > pidgin.yaz
diff src/network.c @ 11424:e1ab173ef3b5
[gaim-migrate @ 13661]
prefs for STUN
adjustments for NTLM in SIP
committer: Tailor Script <tailor@pidgin.im>
author | Thomas Butter <tbutter> |
---|---|
date | Fri, 02 Sep 2005 09:09:04 +0000 |
parents | 8caea199b018 |
children | 5f65a0cca87c |
line wrap: on
line diff
--- a/src/network.c Fri Sep 02 06:57:54 2005 +0000 +++ b/src/network.c Fri Sep 02 09:09:04 2005 +0000 @@ -144,6 +144,7 @@ { const char *ip = NULL; GaimUPnPControlInfo* controlInfo = NULL; + struct stun_nattype *stun; /* Check if the user specified an IP manually */ if (!gaim_prefs_get_bool("/core/network/auto_ip")) { @@ -152,6 +153,14 @@ return ip; } + if (ip == NULL || *ip == '\0') { + /* Check if STUN discovery was already done */ + stun = gaim_stun_discover(NULL); + if(stun && stun->status>1) + return stun->publicip; + } + + /* attempt to get the ip from a NAT device */ if ((controlInfo = gaim_upnp_discover()) != NULL) { ip = gaim_upnp_get_public_ip(controlInfo);