diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-06-06 17:36:57 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-06-06 17:36:57 +0000 |
commit | b6ac9c016c8cc5faa1b2846cb13149d24523322a (patch) | |
tree | 986f9155785cae1fbc74b5b194900e834469d9b1 /apps/app_chanisavail.c | |
parent | 1858dc748b2b4d91e74b958a337e8f2d4d0b170e (diff) |
Can't use the same buffer to snprintf that we're grabbing
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3156 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_chanisavail.c')
-rwxr-xr-x | apps/app_chanisavail.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/app_chanisavail.c b/apps/app_chanisavail.c index 1c21af48b..a77777334 100755 --- a/apps/app_chanisavail.c +++ b/apps/app_chanisavail.c @@ -54,7 +54,7 @@ static int chanavail_exec(struct ast_channel *chan, void *data) { int res=-1; struct localuser *u; - char info[512], *peers, *tech, *number, *rest, *cur; + char info[512], tmp[512], *peers, *tech, *number, *rest, *cur; struct ast_channel *tempchan; if (!data) { @@ -85,8 +85,8 @@ static int chanavail_exec(struct ast_channel *chan, void *data) if ((tempchan = ast_request(tech, chan->nativeformats, number))) { pbx_builtin_setvar_helper(chan, "AVAILCHAN", tempchan->name); /* Store the originally used channel too */ - snprintf(info, sizeof(info), "%s/%s", tech, number); - pbx_builtin_setvar_helper(chan, "AVAILORIGCHAN", info); + snprintf(tmp, sizeof(tmp), "%s/%s", tech, number); + pbx_builtin_setvar_helper(chan, "AVAILORIGCHAN", tmp); ast_hangup(tempchan); tempchan = NULL; res = 1; |