Due to the way stringfields work the value of the url pointer will always be non...
authorJoshua Colp <jcolp@digium.com>
Mon, 28 May 2007 23:24:04 +0000 (23:24 +0000)
committerJoshua Colp <jcolp@digium.com>
Mon, 28 May 2007 23:24:04 +0000 (23:24 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@66314 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 4c63ffe..223e227 100644 (file)
@@ -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);
        }