summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2007-12-27 17:28:52 +0000
committerJoshua Colp <jcolp@digium.com>2007-12-27 17:28:52 +0000
commitfcf927e59717137a67d592e84c661fbdd6999cd3 (patch)
treed88392a922c4a8538cbb6f1ead3e9d12f2b5cd97
parentb634b8ccca4c643d6e31fe991ff1a1ef130d32d4 (diff)
Merged revisions 94905 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r94905 | file | 2007-12-27 13:27:11 -0400 (Thu, 27 Dec 2007) | 4 lines Use ast_strlen_zero to see if our_contact is set or not on the dialog. It is possible for it to be a pointer to NULL. (closes issue #11557) Reported by: FuriousGeorge ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@94908 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r--channels/chan_sip.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 9390fc5e1..91fa1458e 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -6602,7 +6602,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);
}