app_agent_pool: Fix AMI/CLI AgentLogoff soft preventing agents from logging back in.
authorRichard Mudgett <rmudgett@digium.com>
Tue, 8 Oct 2013 21:20:19 +0000 (21:20 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Tue, 8 Oct 2013 21:20:19 +0000 (21:20 +0000)
* Clear the deferred_logoff flag when an agent logs in.

(closes issue ASTERISK-22669)
Reported by: John Bigelow
........

Merged revisions 400754 from http://svn.asterisk.org/svn/asterisk/branches/12

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

apps/app_agent_pool.c

index 4493b2e..c968153 100644 (file)
@@ -2032,6 +2032,7 @@ static int agent_login_exec(struct ast_channel *chan, const char *data)
        agent->logged = ast_channel_ref(chan);
        agent->last_disconnect = ast_tvnow();
        time(&agent->login_start);
+       agent->deferred_logoff = 0;
        agent_unlock(agent);
 
        agent_login_channel_config(agent, chan);