[asterisk-commits] trunk r8883 - in /trunk: UPGRADE.txt funcs/func_md5.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Tue Jan 31 14:20:36 MST 2006


Author: tilghman
Date: Mon Jan 30 00:07:05 2006
New Revision: 8883

URL: http://svn.digium.com/view/asterisk?rev=8883&view=rev
Log:
Bug 6378 - deprecate CHECK_MD5 function

Modified:
    trunk/UPGRADE.txt
    trunk/funcs/func_md5.c

Modified: trunk/UPGRADE.txt
URL: http://svn.digium.com/view/asterisk/trunk/UPGRADE.txt?rev=8883&r1=8882&r2=8883&view=diff
==============================================================================
--- trunk/UPGRADE.txt (original)
+++ trunk/UPGRADE.txt Mon Jan 30 00:07:05 2006
@@ -21,6 +21,7 @@
 * app_read has been updated to use the newer options codes, using "skip" or
   "noanswer" will not work.  Use s or n.  Also there is a new feature i, for
   using indication tones, so typing in skip would give you unexpected results.
+
 Variables:
 
 * The builtin variables ${CALLERID}, ${CALLERIDNAME}, ${CALLERIDNUM},
@@ -29,6 +30,11 @@
   functions.  You are encouraged to move towards the associated dialplan
   function, as these variables will be removed in a future release.
 
+Functions:
+
+* The function ${CHECK_MD5()} has been deprecated in favor of using an
+  expression: $[${MD5(<string>)} = ${saved_md5}].
+
 The SIP channel:
 
 * The "incominglimit" setting is replaced by the "call-limit" setting in sip.conf.

Modified: trunk/funcs/func_md5.c
URL: http://svn.digium.com/view/asterisk/trunk/funcs/func_md5.c?rev=8883&r1=8882&r2=8883&view=diff
==============================================================================
--- trunk/funcs/func_md5.c (original)
+++ trunk/funcs/func_md5.c Mon Jan 30 00:07:05 2006
@@ -57,6 +57,7 @@
 {
 	char newmd5[33];
 	char *parse;
+	static int deprecated = 0;
 	AST_DECLARE_APP_ARGS(args,
 		AST_APP_ARG(digest);
 		AST_APP_ARG(data);
@@ -75,6 +76,11 @@
 	if (args.argc < 2) {
 		ast_log(LOG_WARNING, "Syntax: CHECK_MD5(<digest>,<data>) - missing argument!\n");
 		return NULL;
+	}
+
+	if (!deprecated) {
+		deprecated = 1;
+		ast_log(LOG_WARNING, "CHECK_MD5() is deprecated in Asterisk 1.4 and later.\n");
 	}
 
 	ast_md5_hash(newmd5, args.data);



More information about the asterisk-commits mailing list