diff options
author | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-04-24 20:43:03 +0000 |
---|---|---|
committer | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-04-24 20:43:03 +0000 |
commit | e3133099230e888a65f4700a6b8569211db025ec (patch) | |
tree | 571223bef8cbb703279085dcef33b4282ce011aa /apps/app_queue.c | |
parent | cb89206ff2153a517836b3af25e2f9ebd890e430 (diff) |
Output of channel variables when eventwhencalled=vars was set
was being truncated two characters. This patch corrects the
problem.
(closes issue #12493)
Reported by: davidw
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@114628 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_queue.c')
-rw-r--r-- | apps/app_queue.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c index 08e85c02f..f3b331a87 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -1761,10 +1761,10 @@ static char *vars2manager(struct ast_channel *chan, char *vars, size_t len) j += 9; } } - if (j > len - 1) - j = len - 1; - vars[j - 2] = '\r'; - vars[j - 1] = '\n'; + if (j > len - 3) + j = len - 3; + vars[j++] = '\r'; + vars[j++] = '\n'; vars[j] = '\0'; } else { /* there are no channel variables; leave it blank */ |