Fix inversion error on addrcmp (bug #3155)
authorMark Spencer <markster@digium.com>
Mon, 27 Dec 2004 13:36:34 +0000 (13:36 +0000)
committerMark Spencer <markster@digium.com>
Mon, 27 Dec 2004 13:36:34 +0000 (13:36 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4560 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 781584d..8c43659 100755 (executable)
@@ -1156,7 +1156,7 @@ static int sip_addrcmp(char *name, struct sockaddr_in *sin)
 {
        /* We know name is the first field, so we can cast */
        struct sip_peer *p = (struct sip_peer *)name;
-       return  (!inaddrcmp(&p->addr, sin) || 
+       return  !(!inaddrcmp(&p->addr, sin) || 
                                        (p->insecure &&
                                        (p->addr.sin_addr.s_addr == sin->sin_addr.s_addr)));
 }