[svn-commits] trunk r37301 - in /trunk: ./ channels/chan_agent.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Fri Jul 7 09:16:41 MST 2006


Author: bweschke
Date: Fri Jul  7 11:16:41 2006
New Revision: 37301

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

........
r37212 | bweschke | 2006-07-06 15:38:45 -0500 (Thu, 06 Jul 2006) | 3 lines

 Don't do wierd things on a callback agent that has attempted logoff while still on the phone.


........

Modified:
    trunk/   (props changed)
    trunk/channels/chan_agent.c

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

Modified: trunk/channels/chan_agent.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_agent.c?rev=37301&r1=37300&r2=37301&view=diff
==============================================================================
--- trunk/channels/chan_agent.c (original)
+++ trunk/channels/chan_agent.c Fri Jul  7 11:16:41 2006
@@ -771,14 +771,16 @@
 			ast_channel_lock(p->chan);
 			ast_softhangup(p->chan, AST_SOFTHANGUP_EXPLICIT);
 			ast_channel_unlock(p->chan);
-		} else {
+		} else if (p->loginstart) {
 			ast_channel_lock(p->chan);
 			ast_moh_start(p->chan, p->moh);
 			ast_channel_unlock(p->chan);
 		}
 	}
 	ast_mutex_unlock(&p->lock);
-	ast_device_state_changed("Agent/%s", p->agent);
+	/* Only register a device state change if the agent is still logged in */
+	if (p->loginstart)
+		ast_device_state_changed("Agent/%s", p->agent);
 
 	if (p->pending) {
 		AST_LIST_LOCK(&agents);



More information about the svn-commits mailing list