Merged revisions 7986 via svnmerge from
[asterisk/asterisk.git] / 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 (;;) {