[asterisk-commits] mnicholson: branch 1.8 r327890 - /branches/1.8/apps/app_directory.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jul 12 15:07:24 CDT 2011


Author: mnicholson
Date: Tue Jul 12 15:07:20 2011
New Revision: 327890

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=327890
Log:
search in the current context for 'a' and 'o' instead of 'default'

Modified:
    branches/1.8/apps/app_directory.c

Modified: branches/1.8/apps/app_directory.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/apps/app_directory.c?view=diff&rev=327890&r1=327889&r2=327890
==============================================================================
--- branches/1.8/apps/app_directory.c (original)
+++ branches/1.8/apps/app_directory.c Tue Jul 12 15:07:20 2011
@@ -57,7 +57,8 @@
 			<parameter name="dial-context" required="false">
 				<para>This is the dialplan context to use when looking for an
 				extension that the user has selected, or when jumping to the
-				<literal>o</literal> or <literal>a</literal> extension.</para>
+				<literal>o</literal> or <literal>a</literal> extension. If not
+				specified, the current context will be used.</para>
 			</parameter>
 			<parameter name="options" required="false">
 				<optionlist>
@@ -246,7 +247,7 @@
 
 static int goto_exten(struct ast_channel *chan, const char *dialcontext, char *ext)
 {
-	if (!ast_goto_if_exists(chan, dialcontext, ext, 1) ||
+	if (!ast_goto_if_exists(chan, S_OR(dialcontext, chan->context), ext, 1) ||
 		(!ast_strlen_zero(chan->macrocontext) &&
 		!ast_goto_if_exists(chan, chan->macrocontext, ext, 1))) {
 		return 0;
@@ -685,11 +686,11 @@
 	int count, i;
 	char ext[10] = "";
 
-	if (digit == '0' && !goto_exten(chan, S_OR(dialcontext, "default"), "o")) {
+	if (digit == '0' && !goto_exten(chan, dialcontext, "o")) {
 		return digit;
 	}
 
-	if (digit == '*' && !goto_exten(chan, S_OR(dialcontext, "default"), "a")) {
+	if (digit == '*' && !goto_exten(chan, dialcontext, "a")) {
 		return digit;
 	}
 




More information about the asterisk-commits mailing list