[svn-commits] irroot: branch irroot/asterisk-trunk-quack-queue r345369 - /team/irroot/aster...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Nov 15 10:58:31 CST 2011


Author: irroot
Date: Tue Nov 15 10:58:27 2011
New Revision: 345369

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=345369
Log:
Use of watching broke RNA

Modified:
    team/irroot/asterisk-trunk-quack-queue/apps/app_queue.c

Modified: team/irroot/asterisk-trunk-quack-queue/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/asterisk-trunk-quack-queue/apps/app_queue.c?view=diff&rev=345369&r1=345368&r2=345369
==============================================================================
--- team/irroot/asterisk-trunk-quack-queue/apps/app_queue.c (original)
+++ team/irroot/asterisk-trunk-quack-queue/apps/app_queue.c Tue Nov 15 10:58:27 2011
@@ -1908,7 +1908,7 @@
 	const char *interface = (arg && flags & OBJ_POINTER) ? mem->interface : arg;
 
 	if (!arg || ast_strlen_zero(interface) || !strcasecmp(interface, c->member->interface)) {
-		return (c->watching) ? CMP_MATCH : 0;
+		return (c->stillgoing && c->chan) ? CMP_MATCH : 0;
 	}
 	return 0;
 }
@@ -3932,13 +3932,19 @@
 		/* Service all of the outgoing channels */
 		calls = ao2_find(qe->attempts, NULL, OBJ_MULTIPLE);
 		while (calls && (o = ao2_iterator_next(calls))) {
-			/* i need to be re added to the watchers */
-			o->watching = 0;
-
 			/* We go with a static buffer here instead of using ast_strdupa. Using
 			 * ast_strdupa in a loop like this one can cause a stack overflow
 			 */
 			char ochan_name[AST_CHANNEL_NAME];
+
+			/* i need to be re added to the watchers */
+			if (!o->watching) {
+				ao2_ref(o, -1);
+				continue;
+			} else {
+				o->watching = 0;
+			}
+
 			if (o->chan) {
 				ast_channel_lock(o->chan);
 				ast_copy_string(ochan_name, o->chan->name, sizeof(ochan_name));




More information about the svn-commits mailing list