[asterisk-commits] mvanbaak: branch mvanbaak/privacymanager_check_context r120788 - /team/mvanba...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jun 5 13:49:06 CDT 2008


Author: mvanbaak
Date: Thu Jun  5 13:49:06 2008
New Revision: 120788

URL: http://svn.digium.com/view/asterisk?view=rev&rev=120788
Log:
redo this whole thing.
This is cleaner, compiles, and matches the feedback I got from russellb

Modified:
    team/mvanbaak/privacymanager_check_context/apps/app_privacy.c

Modified: team/mvanbaak/privacymanager_check_context/apps/app_privacy.c
URL: http://svn.digium.com/view/asterisk/team/mvanbaak/privacymanager_check_context/apps/app_privacy.c?view=diff&rev=120788&r1=120787&r2=120788
==============================================================================
--- team/mvanbaak/privacymanager_check_context/apps/app_privacy.c (original)
+++ team/mvanbaak/privacymanager_check_context/apps/app_privacy.c Thu Jun  5 13:49:06 2008
@@ -67,7 +67,6 @@
 	int retries;
 	int maxretries = 3;
 	int minlength = 10;
-	char checkcontext[AST_MAX_CONTEXT];
 	int x = 0;
 	char phone[30];
 	char *parse = NULL;
@@ -104,13 +103,6 @@
 				else
 					ast_log(LOG_WARNING, "Invalid min length argument\n");
 			}
-			if (args.checkcontext) {
-				if (sscanf(args.checkcontext, "%s", &x) == 1)
-					checkcontext = x;
-				else
-					ast_log(LOG_WARNING, "Invalid check context argument\n");
-			}
-
 		}		
 
 		/* Play unidentified call */
@@ -135,11 +127,9 @@
 
 			/* Make sure we get at least digits */
 			if (strlen(phone) >= minlength ) 
-				if (checkcontext) {
-					res = ast_exists_extension(NULL, checkcontext, phone, 1);
-					if (!res)
-						res = ast_waitstream(chan, "");
-					else
+				if (ast_strlen_zero(args.checkcontext)) {
+					res = ast_exists_extension(NULL, args.checkcontext, phone, 1, NULL);
+					if (res)
 						break;
 				} else {
 					break;




More information about the asterisk-commits mailing list