[asterisk-commits] file: branch 1.4 r57093 - in /branches/1.4: ./ channels/chan_agent.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed Feb 28 11:57:53 MST 2007


Author: file
Date: Wed Feb 28 12:57:52 2007
New Revision: 57093

URL: http://svn.digium.com/view/asterisk?view=rev&rev=57093
Log:
Merged revisions 57092 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r57092 | file | 2007-02-28 13:55:45 -0500 (Wed, 28 Feb 2007) | 2 lines

Fix a few more issues with the agent logoff CLI command. (issue #9123 reported by arbrandes)

........

Modified:
    branches/1.4/   (props changed)
    branches/1.4/channels/chan_agent.c

Propchange: branches/1.4/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.

Modified: branches/1.4/channels/chan_agent.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_agent.c?view=diff&rev=57093&r1=57092&r2=57093
==============================================================================
--- branches/1.4/channels/chan_agent.c (original)
+++ branches/1.4/channels/chan_agent.c Wed Feb 28 12:57:52 2007
@@ -778,6 +778,8 @@
 					ast_log(LOG_NOTICE, "Agent '%s' didn't answer/confirm within %d seconds (waited %d)\n", p->name, p->autologoff, howlong);
 				p->deferlogoff = 0;
 				agent_logoff_maintenance(p, p->loginchan, logintime, ast->uniqueid, "Autologoff");
+				if (persistent_agents)
+					dump_agents();
 			}
 		} else if (p->dead) {
 			ast_channel_lock(p->chan);
@@ -792,9 +794,16 @@
 		}
 	}
 	ast_mutex_unlock(&p->lock);
+
 	/* Only register a device state change if the agent is still logged in */
-	if (p->loginstart)
+	if (!p->loginstart) {
+		p->loginchan[0] = '\0';
+		p->logincallerid[0] = '\0';
+		if (persistent_agents)
+			dump_agents();
+	} else {
 		ast_device_state_changed("Agent/%s", p->agent);
+	}
 
 	if (p->pending) {
 		AST_LIST_LOCK(&agents);



More information about the asterisk-commits mailing list