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

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sun Jun 8 06:29:55 CDT 2008


Author: mvanbaak
Date: Sun Jun  8 06:29:54 2008
New Revision: 121195

URL: http://svn.digium.com/view/asterisk?view=rev&rev=121195
Log:
cleanup of code
Of course it already worked, as long as the dialplan was correct.

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=121195&r1=121194&r2=121195
==============================================================================
--- team/mvanbaak/privacymanager_check_context/apps/app_privacy.c (original)
+++ team/mvanbaak/privacymanager_check_context/apps/app_privacy.c Sun Jun  8 06:29:54 2008
@@ -129,15 +129,13 @@
 			if (strlen(phone) >= minlength ) {
 				/* if we have a checkcontext argument, do pattern matching */
 				if (!ast_strlen_zero(args.checkcontext)) {
-					ast_log(LOG_WARNING, "Going to check context %s for exten %s prio 1\n", args.checkcontext, phone);
-					res = ast_exists_extension(NULL, args.checkcontext, phone, 1, NULL);
-					if (res) {
-						break;
-					} else {
+					if (!ast_exists_extension(NULL, args.checkcontext, phone, 1, NULL)) {
 						res = ast_streamfile(chan, "privacy-incorrect", chan->language);
 						if (!res) {
 							res = ast_waitstream(chan, "");
 						}
+					} else {
+						break;
 					}
 				} else {
 					break;




More information about the asterisk-commits mailing list