From e3133099230e888a65f4700a6b8569211db025ec Mon Sep 17 00:00:00 2001 From: mmichelson Date: Thu, 24 Apr 2008 20:43:03 +0000 Subject: 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 --- apps/app_queue.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'apps') 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 */ -- cgit v1.2.3