[asterisk-commits] mnicholson: trunk r341487 - in /trunk: ./ apps/app_queue.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Oct 19 16:24:11 CDT 2011


Author: mnicholson
Date: Wed Oct 19 16:24:07 2011
New Revision: 341487

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=341487
Log:
Merged revisions 341486 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/10

........
  r341486 | mnicholson | 2011-10-19 16:23:17 -0500 (Wed, 19 Oct 2011) | 18 lines
  
  Fix a performance regression introduced in r325483.
  
  The regression was caused by a call to ast_parse_device_state() in app_queue's
  ring_entry() function. The ast_parse_device_state() function eventually calls
  ast_channel_get_full() with a channel name prefix which causes it to walk the
  channel list causing massive lock contention and slow downs.
  
  This patch fixes the regression by removing the call to
  ast_parase_device_state() which should be unnecessary. Queue member device
  state should be maintained by device state events. Some users have seen
  instances where busy agents were called when they shouldn't have, which is the
  reason the call to ast_parse_device_state() was added. That change appears to
  have resolved that issue but also causes this performance regression. There may
  still be issues with queue member status, and if so, alternative methods should
  be investigated to resolve them.
  
  AST-695
........

Modified:
    trunk/   (props changed)
    trunk/apps/app_queue.c

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

Modified: trunk/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_queue.c?view=diff&rev=341487&r1=341486&r2=341487
==============================================================================
--- trunk/apps/app_queue.c (original)
+++ trunk/apps/app_queue.c Wed Oct 19 16:24:07 2011
@@ -3076,7 +3076,6 @@
 	char tech[256];
 	char *location;
 	const char *macrocontext, *macroexten;
-	enum ast_device_state newstate;
 
 	/* on entry here, we know that tmp->chan == NULL */
 	if (tmp->member->paused) {
@@ -3101,14 +3100,6 @@
 	}
 
 	if (!qe->parent->ringinuse || !tmp->member->ignorebusy) {
-		if ((tmp->member->status == AST_DEVICE_UNKNOWN) || (tmp->member->status == AST_DEVICE_NOT_INUSE)) {
-			newstate = ast_parse_device_state(tmp->member->interface);
-			if (newstate != tmp->member->status) {
-				ast_log(LOG_ERROR, "Found a channel matching iterface %s while status was %i changed to %i\n",
-					tmp->member->interface, tmp->member->status, newstate);
-				update_status(qe->parent, tmp->member, newstate);
-			}
-		}
 		if ((tmp->member->status != AST_DEVICE_NOT_INUSE) && (tmp->member->status != AST_DEVICE_UNKNOWN)) {
 			ast_debug(1, "%s in use, can't receive call\n", tmp->interface);
 			if (qe->chan->cdr) {




More information about the asterisk-commits mailing list