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:
Tilghman Lesher
2006-01-30 06:07:05 +00:00
parent 37815b2cce
commit f9811bc198
2 changed files with 12 additions and 0 deletions

View File

@@ -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 */