Merged revisions 7986 via svnmerge from
authorRussell Bryant <russell@russellbryant.com>
Wed, 11 Jan 2006 19:13:33 +0000 (19:13 +0000)
committerRussell Bryant <russell@russellbryant.com>
Wed, 11 Jan 2006 19:13:33 +0000 (19:13 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r7986 | russell | 2006-01-11 14:08:53 -0500 (Wed, 11 Jan 2006) | 2 lines

move variable to correct scope (issue #6197)

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7987 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_agent.c

index c22c650..2b88d62 100644 (file)
@@ -1687,6 +1687,7 @@ static int __login_exec(struct ast_channel *chan, void *data, int callbackmode)
        char agent_goodbye[AST_MAX_FILENAME_LEN];
        int update_cdr = updatecdr;
        char *filename = "agent-loginok";
+       char tmpchan[AST_MAX_BUF] = "";
 
        LOCAL_USER_ADD(u);
 
@@ -1817,7 +1818,6 @@ static int __login_exec(struct ast_channel *chan, void *data, int callbackmode)
                                        snprintf(agent, sizeof(agent), "Agent/%s", p->agent);
 
                                        if (callbackmode) {
-                                               char tmpchan[AST_MAX_BUF] = "";
                                                int pos = 0;
                                                /* Retrieve login chan */
                                                for (;;) {