Correct misuse of ast_strip_quoted() when getting a Diversion header's reason parameter.
authorMark Michelson <mmichelson@digium.com>
Tue, 15 May 2012 23:41:59 +0000 (23:41 +0000)
committerMark Michelson <mmichelson@digium.com>
Tue, 15 May 2012 23:41:59 +0000 (23:41 +0000)
The use here was assuming that the pointer would be updated, but the updated string
is actually returned by ast_strip_quoted() instead.
........

Merged revisions 366597 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 366598 from http://svn.asterisk.org/svn/asterisk/branches/10

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

channels/chan_sip.c

index 0cf12ac..a85563b 100644 (file)
@@ -15771,7 +15771,7 @@ static int get_rdnis(struct sip_pvt *p, struct sip_request *oreq, char **name, c
                        }
                        /* Remove enclosing double-quotes */
                        if (*reason_param == '"')
-                               ast_strip_quoted(reason_param, "\"", "\"");
+                               reason_param = ast_strip_quoted(reason_param, "\"", "\"");
                        if (!ast_strlen_zero(reason_param)) {
                                sip_set_redirstr(p, reason_param);
                                if (p->owner) {