[svn-commits] trunk r17626 - /trunk/apps/app_channelredirect.c
svn-commits at lists.digium.com
svn-commits at lists.digium.com
Wed Apr 5 10:03:31 MST 2006
Author: tilghman
Date: Wed Apr 5 12:03:30 2006
New Revision: 17626
URL: http://svn.digium.com/view/asterisk?rev=17626&view=rev
Log:
Bug 6508 - if priority was a number, then findlabel fails
Modified:
trunk/apps/app_channelredirect.c
Modified: trunk/apps/app_channelredirect.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_channelredirect.c?rev=17626&r1=17625&r2=17626&view=diff
==============================================================================
--- trunk/apps/app_channelredirect.c (original)
+++ trunk/apps/app_channelredirect.c Wed Apr 5 12:03:30 2006
@@ -99,15 +99,16 @@
context = NULL;
}
- if (!(prio = ast_findlabel_extension(chan2, S_OR(context, chan2->context), S_OR(exten, chan2->exten),
- priority, chan2->cid.cid_num))) {
+ /* ast_findlabel_extension does not convert numeric priorities; it only does a lookup */
+ if (!(prio = atoi(priority)) && !(prio = ast_findlabel_extension(chan2, S_OR(context, chan2->context),
+ S_OR(exten, chan2->exten), priority, chan2->cid.cid_num))) {
ast_log(LOG_WARNING, "'%s' is not a known priority or label\n", priority);
goto chanquit;
}
- ast_log(LOG_DEBUG, "Attempting async goto (%s) to %s\n", args.channel, args.label);
+ ast_log(LOG_DEBUG, "Attempting async goto (%s) to %s|%s|%d\n", args.channel, S_OR(context, chan2->context), S_OR(exten, chan2->exten), prio);
- if (ast_async_goto_if_exists(chan2, context ? context : chan2->context, exten ? exten : chan2->exten, prio))
+ if (ast_async_goto_if_exists(chan2, S_OR(context, chan2->context), S_OR(exten, chan2->exten), prio))
ast_log(LOG_WARNING, "%s failed for %s\n", app, args.channel);
else
res = 0;
More information about the svn-commits
mailing list