]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Don't add custom URI options if they don't exist OR they are empty.
authorJoshua Colp <jcolp@digium.com>
Thu, 10 Apr 2008 13:27:11 +0000 (13:27 +0000)
committerJoshua Colp <jcolp@digium.com>
Thu, 10 Apr 2008 13:27:11 +0000 (13:27 +0000)
(closes issue #12407)
Reported by: homesick
Patches:
      uri_options-1.4.diff uploaded by homesick (license 91)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@114021 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index ab5be589107de394bdba04f491a089a38b3622ed..ef7e5171b2c032cacc5f9e91b22f9ca52d8ddb7a 100644 (file)
@@ -7034,7 +7034,7 @@ static void initreqprep(struct sip_request *req, struct sip_pvt *p, int sipmetho
        }
 
        /* If custom URI options have been provided, append them */
-       if (p->options && p->options->uri_options)
+       if (p->options && !ast_strlen_zero(p->options->uri_options))
                ast_build_string(&invite, &invite_max, ";%s", p->options->uri_options);
        
        ast_string_field_set(p, uri, invite_buf);