From: Mark Michelson Date: Thu, 24 Apr 2008 20:43:52 +0000 (+0000) Subject: Merged revisions 114628 via svnmerge from X-Git-Tag: 1.6.2.0-beta1~2389 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=14fc93e72106fa26aec76c53fc9bb26b617e6770;p=thirdparty%2Fasterisk.git Merged revisions 114628 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r114628 | mmichelson | 2008-04-24 15:43:03 -0500 (Thu, 24 Apr 2008) | 8 lines 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: https://origsvn.digium.com/svn/asterisk/trunk@114629 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/apps/app_queue.c b/apps/app_queue.c index ae43243e85..c955e8f4da 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -2077,10 +2077,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 */