summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2007-05-28 23:24:04 +0000
committerJoshua Colp <jcolp@digium.com>2007-05-28 23:24:04 +0000
commit39e9b3112c642835b0a4b3d0ee348c686215851b (patch)
tree902f653685bb3db1d1438573daf0cad37cfe7baf
parentc273ccec4109d8472d1a28a6b5daaaf7f4a8cd15 (diff)
Due to the way stringfields work the value of the url pointer will always be non-NULL so we have to use ast_strlen_zero to make sure it is not empty. (issue #9821 reported by pj)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@66314 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r--channels/chan_sip.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 4c63ffe15..223e2276c 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -6150,7 +6150,7 @@ static int respprep(struct sip_request *resp, struct sip_pvt *p, const char *msg
add_header(resp, "Contact", p->our_contact);
}
- if (p->url) {
+ if (!ast_strlen_zero(p->url)) {
add_header(resp, "Access-URL", p->url);
ast_string_field_free(p, url);
}
@@ -6260,7 +6260,7 @@ static int reqprep(struct sip_request *req, struct sip_pvt *p, int sipmethod, in
if (!ast_strlen_zero(p->rpid))
add_header(req, "Remote-Party-ID", p->rpid);
- if (p->url) {
+ if (!ast_strlen_zero(p->url)) {
add_header(req, "Access-URL", p->url);
ast_string_field_free(p, url);
}