Module: sip-router
Branch: master
Commit: 85de7fe6e1d4771f7759c1da68b330a153d5794b
URL:    
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=85de7fe6e1d4771f7759c1da68b330a153d5794b

Author: Juha Heinanen <[email protected]>
Committer: Juha Heinanen <[email protected]>
Date:   Fri Jun  8 23:10:43 2012 +0300

msg_translator.c: got rid of compiler warning

- Many more to go before 3.3 release.

---

 msg_translator.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/msg_translator.c b/msg_translator.c
index 1ef2032..f45cb66 100644
--- a/msg_translator.c
+++ b/msg_translator.c
@@ -195,16 +195,20 @@ static int check_via_address(struct ip_addr* ip, str 
*name,
        struct hostent* he;
        int i;
        char* s;
+       #ifdef USE_IPV6
        int len;
+       #endif
 
        /* maybe we are lucky and name it's an ip */
        s=ip_addr2a(ip);
        if (s){
                DBG("check_via_address(%s, %.*s, %d)\n",
                        s, name->len, name->s, resolver);
-               len=strlen(s);
 
        #ifdef USE_IPV6
+
+               len=strlen(s);
+
                /* check if name->s is an ipv6 address or an ipv6 address ref. 
*/
                if ((ip->af==AF_INET6) &&
                                (       
((len==name->len)&&(strncasecmp(name->s, s, name->len)==0))


_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to