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
1.6.0
Joshua Colp 19 years ago
parent c273ccec41
commit 39e9b3112c

@ -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);
}

Loading…
Cancel
Save