[asterisk-commits] mmichelson: trunk r82185 - /trunk/apps/app_queue.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Sep 10 14:10:46 CDT 2007


Author: mmichelson
Date: Mon Sep 10 14:10:46 2007
New Revision: 82185

URL: http://svn.digium.com/view/asterisk?view=rev&rev=82185
Log:
Fixing a problem where NULL channels would cause a crash when calling indisposed queue members (i.e. paused, wrapup time not completed, etc.)


Modified:
    trunk/apps/app_queue.c

Modified: trunk/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_queue.c?view=diff&rev=82185&r1=82184&r2=82185
==============================================================================
--- trunk/apps/app_queue.c (original)
+++ trunk/apps/app_queue.c Mon Sep 10 14:10:46 2007
@@ -2079,8 +2079,10 @@
 
 	starttime = (long) time(NULL);
 #ifdef HAVE_EPOLL
-	for (epollo = outgoing; epollo; epollo = epollo->q_next)
-		ast_poll_channel_add(in, epollo->chan);
+	for (epollo = outgoing; epollo; epollo = epollo->q_next) {
+		if(epollo->chan)
+			ast_poll_channel_add(in, epollo->chan);
+	}
 #endif
 	
 	while (*to && !peer) {
@@ -2287,8 +2289,10 @@
 	}
 
 #ifdef HAVE_EPOLL
-	for(epollo = outgoing; epollo; epollo = epollo->q_next)
-		ast_poll_channel_del(in, epollo->chan);
+	for(epollo = outgoing; epollo; epollo = epollo->q_next) {
+		if(epollo->chan)
+			ast_poll_channel_del(in, epollo->chan);
+	}
 #endif
 
 	return peer;




More information about the asterisk-commits mailing list