[asterisk-commits] file: branch 1.2 r56279 -
/branches/1.2/channels/chan_agent.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Thu Feb 22 16:19:26 MST 2007
Author: file
Date: Thu Feb 22 17:19:25 2007
New Revision: 56279
URL: http://svn.digium.com/view/asterisk?view=rev&rev=56279
Log:
Always defer Agent logoff if any channels are up until they hang up. (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=56279&r1=56278&r2=56279
==============================================================================
--- branches/1.2/channels/chan_agent.c (original)
+++ branches/1.2/channels/chan_agent.c Thu Feb 22 17:19:25 2007
@@ -1480,15 +1480,13 @@
for (p=agents; p; p=p->next) {
if (!strcasecmp(p->agent, agent)) {
+ if (p->owner || p->chan)
+ defer = 1;
if (!soft) {
- if (p->owner) {
- defer = 1;
+ if (p->owner)
ast_softhangup(p->owner, AST_SOFTHANGUP_EXPLICIT);
- }
- if (p->chan) {
- defer = 1;
+ if (p->chan)
ast_softhangup(p->chan, AST_SOFTHANGUP_EXPLICIT);
- }
}
ret = 0; /* found an agent => return 0 */
logintime = time(NULL) - p->loginstart;
More information about the asterisk-commits
mailing list