[asterisk-commits] file: branch 1.2 r57092 -
/branches/1.2/channels/chan_agent.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Wed Feb 28 11:55:45 MST 2007
Author: file
Date: Wed Feb 28 12:55:45 2007
New Revision: 57092
URL: http://svn.digium.com/view/asterisk?view=rev&rev=57092
Log:
Fix a few more issues with the agent logoff CLI command. (issue #9123 reported by arbrandes)
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?view=diff&rev=57092&r1=57091&r2=57092
==============================================================================
--- branches/1.2/channels/chan_agent.c (original)
+++ branches/1.2/channels/chan_agent.c Wed Feb 28 12:55:45 2007
@@ -793,6 +793,8 @@
} else if (!p->loginstart) {
p->loginchan[0] = '\0';
p->logincallerid[0] = '\0';
+ if (persistent_agents)
+ dump_agents();
}
} else if (p->dead) {
ast_mutex_lock(&p->chan->lock);
@@ -805,9 +807,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_mutex_lock(&agentlock);
More information about the asterisk-commits
mailing list