[Asterisk-cvs] asterisk/apps app_queue.c,1.61,1.62

markster at lists.digium.com markster at lists.digium.com
Tue May 18 01:44:42 CDT 2004


Update of /usr/cvsroot/asterisk/apps
In directory mongoose.digium.com:/tmp/cvs-serv14426/apps

Modified Files:
	app_queue.c 
Log Message:
Flesh out remaining "rrmemory" logic


Index: app_queue.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_queue.c,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -d -r1.61 -r1.62
--- app_queue.c	18 May 2004 05:41:53 -0000	1.61
+++ app_queue.c	18 May 2004 05:56:46 -0000	1.62
@@ -599,8 +599,15 @@
 		qe->parent->rrpos = best->metric % 1000;
 	} else {
 		/* Just increment rrpos */
-		qe->parent->rrpos++;
+		if (!qe->parent->wrapped) {
+			/* No more channels, start over */
+			qe->parent->rrpos = 0;
+		} else {
+			/* Prioritize next entry */
+			qe->parent->rrpos++;
+		}
 	}
+	qe->parent->wrapped = 0;
 	return 0;
 }
 




More information about the svn-commits mailing list