[Asterisk-cvs] asterisk/apps app_authenticate.c,1.5,1.6

markster at lists.digium.com markster at lists.digium.com
Thu Nov 11 10:12:22 CST 2004


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

Modified Files:
	app_authenticate.c 
Log Message:
Allow app_authenticate to go to n+101


Index: app_authenticate.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_authenticate.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- app_authenticate.c	22 Jun 2004 19:32:52 -0000	1.5
+++ app_authenticate.c	11 Nov 2004 15:13:41 -0000	1.6
@@ -47,7 +47,7 @@
 "When using a database key, the value associated with the key can be\n"
 "anything.\n"
 "Returns 0 if the user enters a valid password within three\n"
-"tries, or -1 otherwise (or on hangup).\n";
+"tries, or -1 (or on hangup) or n+101 if exists.\n";
 
 STANDARD_LOCAL_USER;
 
@@ -133,11 +133,14 @@
 		if (!res)
 			res = ast_waitstream(chan, "");
 	} else {
-		if (!res)
-			res = ast_streamfile(chan, "vm-goodbye", chan->language);
-		if (!res)
-			res = ast_waitstream(chan, "");
-		res = -1;
+		if (ast_exists_extension(chan, chan->context, chan->exten, chan->priority + 101, chan->cid.cid_num)) {
+			chan->priority+=100;
+			res = 0;
+		} else {
+			if (!ast_streamfile(chan, "vm-goodbye", chan->language))
+				res = ast_waitstream(chan, "");
+			res = -1;
+		}
 	}
 	LOCAL_USER_REMOVE(u);
 	return res;




More information about the svn-commits mailing list