Module: sip-router Branch: 4.0 Commit: a9089d05121e05287ce91fddb12769acfae866c8 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=a9089d05...
Author: Ovidiu Sas osas@voipembedded.com Committer: Ovidiu Sas osas@voipembedded.com Date: Fri Jun 7 11:17:10 2013 -0400
nathelper: fix IPV6 compiler warning
---
modules/nathelper/nathelper.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/modules/nathelper/nathelper.c b/modules/nathelper/nathelper.c index ab1c66a..48f8dfd 100644 --- a/modules/nathelper/nathelper.c +++ b/modules/nathelper/nathelper.c @@ -880,8 +880,11 @@ add_contact_alias_0_f(struct sip_msg* msg, char* str1, char* str2) }
/* Compare source ip and port against contact uri */ - if (((ip = str2ip(&(uri.host))) == NULL) && - ((ip = str2ip6(&(uri.host))) == NULL)) { + if (((ip = str2ip(&(uri.host))) == NULL) +#ifdef USE_IPV6 + && ((ip = str2ip6(&(uri.host))) == NULL) +#endif + ) { LM_DBG("contact uri host is not an ip address\n"); } else { if (ip_addr_cmp(ip, &(msg->rcv.src_ip)) &&