From: Matthew Jordan Date: Fri, 2 Nov 2012 15:26:07 +0000 (+0000) Subject: Multiple revisions 371357,371469,371860,372628 X-Git-Tag: certified/1.8.15-cert1-rc1~3^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=099cec46eb6a269299d6b98e845539a4b7f5e54a;p=thirdparty%2Fasterisk.git Multiple revisions 371357,371469,371860,372628 ........ 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 --- diff --git a/apps/app_dial.c b/apps/app_dial.c index 38a289df2d..3bd6ab7209 100644 --- a/apps/app_dial.c +++ b/apps/app_dial.c @@ -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); } diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 8272801fe9..40fdcd2018 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -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\" ;party=%s", lid_name, lid_num, fromdomain, ast_test_flag(&p->flags[0], SIP_OUTGOING) ? "calling" : "called"); + ast_str_set(&tmp, -1, "\"%s\" ;party=%s", lid_name, lid_num, fromdomain, p->outgoing_call ? "calling" : "called"); switch (lid_pres) { case AST_PRES_ALLOWED_USER_NUMBER_NOT_SCREENED: diff --git a/funcs/func_math.c b/funcs/func_math.c index e745c4733f..e73979dac3 100644 --- a/funcs/func_math.c +++ b/funcs/func_math.c @@ -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) { diff --git a/main/xmldoc.c b/main/xmldoc.c index 46f91453a8..e4732f873d 100644 --- a/main/xmldoc.c +++ b/main/xmldoc.c @@ -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 element. */ if (xmldoc_parse_para(tmp, "", "\n", &ret)) {