diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-12-27 17:27:11 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-12-27 17:27:11 +0000 |
commit | 1ed7953c2b1788c39d6ff50bcfabcd9a4e5eac08 (patch) | |
tree | 30610021231ac5ee9693967e9900354e717af7c7 /channels | |
parent | f3f66a2d708540ecc25df1dfabbeca73f4f8e360 (diff) |
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: http://svn.digium.com/svn/asterisk/branches/1.4@94905 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_sip.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index b943d9b81..ee01fb6ae 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -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; |