]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Multiple revisions 371357,371469,371860,372628
authorMatthew Jordan <mjordan@digium.com>
Fri, 2 Nov 2012 15:26:07 +0000 (15:26 +0000)
committerMatthew Jordan <mjordan@digium.com>
Fri, 2 Nov 2012 15:26:07 +0000 (15:26 +0000)
........
  r371357 | jrose | 2012-08-16 13:57:27 -0500 (Thu, 16 Aug 2012) | 8 lines

  chan_sip: Use pvt outgoing_call variable to set Remote-Party-ID Header

  Previously the pvt SIP_OUTGOING flag was used instead, which will frequently
  flip during reinvites.

  (closes issue AST-897)
  Reported by: Thomas Arimont
........
  r371469 | mjordan | 2012-08-17 13:51:43 -0500 (Fri, 17 Aug 2012) | 14 lines

  Fix memory leak in XML documentation

  When formatting documentation fields, the XML documentation parser calls
  xmldoc_get_formatted.  This function allocates a string buffer at the
  beginning of its routine.  Unfortunately, on certain code paths, it also
  calls xmldoc_string_cleanup, which assumes that it will create the string
  buffer.  The previously allocated string buffer is then leaked by the
  xmldoc_string_cleanup routine.

  Now: we don't do that.

  (closes issue AST-932)
  Reported by: Alexander Homig
........
  r371860 | rmudgett | 2012-08-29 13:22:24 -0500 (Wed, 29 Aug 2012) | 12 lines

  Fix hangup cause passthrough regression.

  The v1.8 -r369258 change to fix the F and F(x) action logic introduced a
  regression in passing the hangup cause from the called channel to the
  caller channel.

  (closes issue ASTERISK-20287)
  Reported by: Konstantin Suvorov
  Patches:
        app_dial_hangupcause.patch (license #6421) patch uploaded by Konstantin Suvorov (modified)
  Tested by: rmudgett
........
  r372628 | rmudgett | 2012-09-07 17:06:29 -0500 (Fri, 07 Sep 2012) | 5 lines

  Remove annoying unconditional debug message from INC/DEC functions.

  (closes issue AST-1001)
  Reported by: Guenther Kelleter
........

Merged revisions 371357,371469,371860,372628 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

apps/app_dial.c
channels/chan_sip.c
funcs/func_math.c
main/xmldoc.c

index 38a289df2de002bf1c71ccb705643923731bd541..3bd6ab7209af202e8b87275ee19dfe5472a519af 100644 (file)
@@ -2996,9 +2996,9 @@ static int dial_exec_full(struct ast_channel *chan, const char *data, struct ast
                                        /* The peer is now running its own PBX. */
                                        goto out;
                                }
-                       } else {
-                               chan->hangupcause = peer->hangupcause;
                        }
+               } else if (!ast_check_hangup(chan)) {
+                       chan->hangupcause = peer->hangupcause;
                }
                ast_hangup(peer);
        }
index 8272801fe939268f7b445aeec27df2cbecd20259..40fdcd2018c7269f55faf8014eec10d345ff0600 100644 (file)
@@ -11082,7 +11082,7 @@ static int add_rpid(struct sip_request *req, struct sip_pvt *p)
                }
                add_header(req, "P-Asserted-Identity", ast_str_buffer(tmp));
        } else {
-               ast_str_set(&tmp, -1, "\"%s\" <sip:%s@%s>;party=%s", lid_name, lid_num, fromdomain, ast_test_flag(&p->flags[0], SIP_OUTGOING) ? "calling" : "called");
+               ast_str_set(&tmp, -1, "\"%s\" <sip:%s@%s>;party=%s", lid_name, lid_num, fromdomain, p->outgoing_call ? "calling" : "called");
 
                switch (lid_pres) {
                case AST_PRES_ALLOWED_USER_NUMBER_NOT_SCREENED:
index e745c4733ff22716e9c0f180b19fa66419b30869..e73979dac31624f6aad3be109ba97115e94e0c16 100644 (file)
@@ -421,8 +421,6 @@ static int crement_function_read(struct ast_channel *chan, const char *cmd,
                modify_orig = 1;
        }
 
-       ast_log(LOG_NOTICE, "The value is now: %d\n", int_value);
-
        if (snprintf(returnvar, sizeof(returnvar), "%d", int_value) > 0) {
                pbx_builtin_setvar_helper(chan, data, returnvar);
                if (modify_orig) {
index 46f91453a850a62c91d7db2f38dbd70b502252c7..e4732f873d7e0d8806f68a413cb76455efd63957 100644 (file)
@@ -1798,14 +1798,16 @@ static struct ast_str *xmldoc_get_formatted(struct ast_xml_node *node, int raw_o
 {
        struct ast_xml_node *tmp;
        const char *notcleanret, *tmpstr;
-       struct ast_str *ret = ast_str_create(128);
+       struct ast_str *ret;
 
        if (raw_output) {
+               /* xmldoc_string_cleanup will allocate the ret object */
                notcleanret = ast_xml_get_text(node);
                tmpstr = notcleanret;
                xmldoc_string_cleanup(ast_skip_blanks(notcleanret), &ret, 0);
                ast_xml_free_text(tmpstr);
        } else {
+               ret = ast_str_create(128);
                for (tmp = ast_xml_node_get_children(node); tmp; tmp = ast_xml_node_get_next(tmp)) {
                        /* if found, parse a <para> element. */
                        if (xmldoc_parse_para(tmp, "", "\n", &ret)) {