diff --git a/UPGRADE.txt b/UPGRADE.txt index b5a32ab2898e3b11d7972826f5f75c452b8f1633..862c1f3979c77e97271466b9e2999506f744b690 100644 --- a/UPGRADE.txt +++ b/UPGRADE.txt @@ -21,6 +21,7 @@ Applications: * 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 @@ Variables: 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. diff --git a/funcs/func_md5.c b/funcs/func_md5.c index 467799d0cf02745b45e45b4a66f693c27daa2bd4..996521bf7ac334252da2d57c920c29fd2fceff32 100644 --- a/funcs/func_md5.c +++ b/funcs/func_md5.c @@ -57,6 +57,7 @@ static char *builtin_function_checkmd5(struct ast_channel *chan, char *cmd, char { char newmd5[33]; char *parse; + static int deprecated = 0; AST_DECLARE_APP_ARGS(args, AST_APP_ARG(digest); AST_APP_ARG(data); @@ -77,6 +78,11 @@ static char *builtin_function_checkmd5(struct ast_channel *chan, char *cmd, char 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); if (!strcasecmp(newmd5, args.digest) ) /* they match */