[asterisk-commits] tilghman: trunk r159189 - /trunk/pbx/pbx_realtime.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Nov 25 12:01:03 CST 2008


Author: tilghman
Date: Tue Nov 25 12:01:02 2008
New Revision: 159189

URL: http://svn.digium.com/view/asterisk?view=rev&rev=159189
Log:
Don't actually do anything with a negative priority, because we ignore it in
the result, anyway.

Modified:
    trunk/pbx/pbx_realtime.c

Modified: trunk/pbx/pbx_realtime.c
URL: http://svn.digium.com/view/asterisk/trunk/pbx/pbx_realtime.c?view=diff&rev=159189&r1=159188&r2=159189
==============================================================================
--- trunk/pbx/pbx_realtime.c (original)
+++ trunk/pbx/pbx_realtime.c Tue Nov 25 12:01:02 2008
@@ -75,6 +75,12 @@
 	char *ematch;
 	char rexten[AST_MAX_EXTENSION + 20]="";
 	int match;
+	/* Optimization: since we don't support hints in realtime, it's silly to
+	 * query for a hint here, since we won't actually do anything with it.
+	 * This just wastes CPU time and resources. */
+	if (priority < 0) {
+		return NULL;
+	}
 	snprintf(pri, sizeof(pri), "%d", priority);
 	switch(mode) {
 	case MODE_MATCHMORE:




More information about the asterisk-commits mailing list