aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2007-11-27 23:10:05 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2007-11-27 23:10:05 +0000
commit9a837f7eb4677c684ab49c29f13b3ae8e0bc1bc8 (patch)
treef7ed818aac112016f1304ef0a906227068eb6b72 /apps
parent492bcb19250b74f11ae1479a9e84b7bbde9e728f (diff)
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: http://svn.digium.com/svn/asterisk/branches/1.4@89837 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r--apps/app_queue.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c
index 7bae8ca51..d392fdbb8 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -1016,7 +1016,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);
@@ -1739,8 +1739,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;