mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 20:20:07 +00:00
Bug 6378 - deprecate CHECK_MD5 function
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8883 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -21,6 +21,7 @@ Applications:
|
|||||||
* app_read has been updated to use the newer options codes, using "skip" or
|
* 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
|
"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.
|
using indication tones, so typing in skip would give you unexpected results.
|
||||||
|
|
||||||
Variables:
|
Variables:
|
||||||
|
|
||||||
* The builtin variables ${CALLERID}, ${CALLERIDNAME}, ${CALLERIDNUM},
|
* The builtin variables ${CALLERID}, ${CALLERIDNAME}, ${CALLERIDNUM},
|
||||||
@@ -29,6 +30,11 @@ Variables:
|
|||||||
functions. You are encouraged to move towards the associated dialplan
|
functions. You are encouraged to move towards the associated dialplan
|
||||||
function, as these variables will be removed in a future release.
|
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 SIP channel:
|
||||||
|
|
||||||
* The "incominglimit" setting is replaced by the "call-limit" setting in sip.conf.
|
* The "incominglimit" setting is replaced by the "call-limit" setting in sip.conf.
|
||||||
|
@@ -57,6 +57,7 @@ static char *builtin_function_checkmd5(struct ast_channel *chan, char *cmd, char
|
|||||||
{
|
{
|
||||||
char newmd5[33];
|
char newmd5[33];
|
||||||
char *parse;
|
char *parse;
|
||||||
|
static int deprecated = 0;
|
||||||
AST_DECLARE_APP_ARGS(args,
|
AST_DECLARE_APP_ARGS(args,
|
||||||
AST_APP_ARG(digest);
|
AST_APP_ARG(digest);
|
||||||
AST_APP_ARG(data);
|
AST_APP_ARG(data);
|
||||||
@@ -77,6 +78,11 @@ static char *builtin_function_checkmd5(struct ast_channel *chan, char *cmd, char
|
|||||||
return NULL;
|
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);
|
ast_md5_hash(newmd5, args.data);
|
||||||
|
|
||||||
if (!strcasecmp(newmd5, args.digest) ) /* they match */
|
if (!strcasecmp(newmd5, args.digest) ) /* they match */
|
||||||
|
Reference in New Issue
Block a user