[asterisk-commits] branch 1.2 r25563 - /branches/1.2/channels/chan_agent.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon May 8 07:12:21 MST 2006


Author: bweschke
Date: Mon May  8 09:12:20 2006
New Revision: 25563

URL: http://svn.digium.com/view/asterisk?rev=25563&view=rev
Log:
 Don't show agents as available when they are in wrap-up time.  #6726 (ZX81)


Modified:
    branches/1.2/channels/chan_agent.c

Modified: branches/1.2/channels/chan_agent.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/channels/chan_agent.c?rev=25563&r1=25562&r2=25563&view=diff
==============================================================================
--- branches/1.2/channels/chan_agent.c (original)
+++ branches/1.2/channels/chan_agent.c Mon May  8 09:12:20 2006
@@ -1613,7 +1613,10 @@
 				}
 				online_agents++;
 			} else if (!ast_strlen_zero(p->loginchan)) {
-				snprintf(location, sizeof(location) - 20, "available at '%s'", p->loginchan);
+				if (ast_tvdiff_ms(ast_tvnow(), p->lastdisc) > 0 || !(p->lastdisc.tv_sec)) 
+					snprintf(location, sizeof(location) - 20, "available at '%s'", p->loginchan);
+				else 
+					snprintf(location, sizeof(location) - 20, "wrapping up at '%s'", p->loginchan);
 				talkingto[0] = '\0';
 				online_agents++;
 				if (p->acknowledged)



More information about the asterisk-commits mailing list