From: Mark Michelson Date: Tue, 27 Nov 2007 23:11:12 +0000 (+0000) Subject: Merged revisions 89837 via svnmerge from X-Git-Tag: 1.6.0-beta1~3^2~625 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ba7f5fec388d1370e1dd33e164de465b7bbd52c2;p=thirdparty%2Fasterisk.git Merged revisions 89837 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r89837 | mmichelson | 2007-11-27 17:10:05 -0600 (Tue, 27 Nov 2007) | 12 lines Two changes with regards to the 'eventwhencalled' option of queues.conf 1) Due to some signed vs. unsigned silliness, setting 'eventwhencalled' to 'vars' or 'yes' did exactly the same thing. Thus the sign change of the ast_true call. 2) The vars2manager function overwrote a \n for every channel variable it parsed, resulting in bizarre output for the channel variables. This patch remedies this. (related to issue #11385, however I'm not sure if this will actually be enough to close it) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89838 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/apps/app_queue.c b/apps/app_queue.c index 37473d3189..d80641022e 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -1112,7 +1112,7 @@ static void queue_set_param(struct call_queue *q, const char *param, const char if (!strcasecmp(val, "vars")) { q->eventwhencalled = QUEUE_EVENT_VARIABLES; } else { - q->eventwhencalled = ast_true(val); + q->eventwhencalled = -(ast_true(val)); } } else if (!strcasecmp(param, "reportholdtime")) { q->reportholdtime = ast_true(val); @@ -1868,8 +1868,8 @@ static char *vars2manager(struct ast_channel *chan, char *vars, size_t len) if (tmp[i + 1] == '\0') break; if (tmp[i] == '\n') { - vars[j] = '\r'; - vars[++j] = '\n'; + vars[j++] = '\r'; + vars[j++] = '\n'; ast_copy_string(&(vars[j]), "Variable: ", len - j); j += 9;