aboutsummaryrefslogtreecommitdiffstats
path: root/pbx
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-11-25 18:01:02 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-11-25 18:01:02 +0000
commitdf9e83769d0c3c1e0bfbb01f09a6e3a348796d87 (patch)
tree51e08704ce8ece859552cdbe07366bf20ed5b4cb /pbx
parent1e9df7b9faef8d5c837a0828fa7edd825d2f6775 (diff)
Don't actually do anything with a negative priority, because we ignore it in
the result, anyway. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@159189 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx')
-rw-r--r--pbx/pbx_realtime.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/pbx/pbx_realtime.c b/pbx/pbx_realtime.c
index 536ed9d27..fbe3c3fdc 100644
--- a/pbx/pbx_realtime.c
+++ b/pbx/pbx_realtime.c
@@ -75,6 +75,12 @@ static struct ast_variable *realtime_switch_common(const char *table, const char
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: