[asterisk-commits] rmudgett: branch rmudgett/bridge_phase r392274 - /team/rmudgett/bridge_phase/...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jun 19 15:05:22 CDT 2013


Author: rmudgett
Date: Wed Jun 19 15:05:20 2013
New Revision: 392274

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=392274
Log:
Adjust where login start time is set.

Modified:
    team/rmudgett/bridge_phase/apps/app_agent_pool.c

Modified: team/rmudgett/bridge_phase/apps/app_agent_pool.c
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/bridge_phase/apps/app_agent_pool.c?view=diff&rev=392274&r1=392273&r2=392274
==============================================================================
--- team/rmudgett/bridge_phase/apps/app_agent_pool.c (original)
+++ team/rmudgett/bridge_phase/apps/app_agent_pool.c Wed Jun 19 15:05:20 2013
@@ -1238,6 +1238,8 @@
 		return 0;
 	}
 	agent->logged = ast_channel_ref(chan);
+	agent->last_disconnect = ast_tvnow();
+	time(&agent->login_start);
 	agent_unlock(agent);
 
 	agent_login_override_config(agent, chan);
@@ -1246,9 +1248,6 @@
 		&& !ast_streamfile(chan, "agent-loginok", ast_channel_language(chan))) {
 		ast_waitstream(chan, "");
 	}
-
-	agent->last_disconnect = ast_tvnow();
-	time(&agent->login_start);
 
 	ast_verb(2, "Agent '%s' logged in (format %s/%s)\n", agent->username,
 		ast_getformatname(ast_channel_readformat(chan)),
@@ -1260,11 +1259,11 @@
 	
 		agent_lock(agent);
 		logintime = time(NULL) - agent->login_start;
-		agent->login_start = 0;
 		agent->logged = ast_channel_unref(chan);
 		agent_unlock(agent);
 	
 		send_agent_logoff(chan, agent->username, logintime);
+		ast_verb(2, "Agent '%s' logged out\n", agent->username);
 	}
 
 	/*! \todo BUGBUG agent_login_exec() not written */




More information about the asterisk-commits mailing list