]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Use ast_strlen_zero to see if our_contact is set or not on the dialog. It is possible...
authorJoshua Colp <jcolp@digium.com>
Thu, 27 Dec 2007 17:27:11 +0000 (17:27 +0000)
committerJoshua Colp <jcolp@digium.com>
Thu, 27 Dec 2007 17:27:11 +0000 (17:27 +0000)
(closes issue #11557)
Reported by: FuriousGeorge

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@94905 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index b943d9b81b2c8c0d2532d5fe5ad78b1e9c4fc1dc..ee01fb6aeeb13f8b1e7e10ef2a573710113ac213 100644 (file)
@@ -5837,7 +5837,7 @@ static int respprep(struct sip_request *resp, struct sip_pvt *p, const char *msg
                        snprintf(contact, sizeof(contact), "%s;expires=%d", p->our_contact, p->expiry);
                        add_header(resp, "Contact", contact);   /* Not when we unregister */
                }
-       } else if (msg[0] != '4' && p->our_contact[0]) {
+       } else if (msg[0] != '4' && !ast_strlen_zero(p->our_contact)) {
                add_header(resp, "Contact", p->our_contact);
        }
        return 0;