add MD5 and CHECK_MD5 functions, deprecate MD5 and MD5Check apps (bug #4123)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5567 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Kevin P. Fleming
2005-05-04 04:05:34 +00:00
parent 523911c9b0
commit b9bda6aa41
3 changed files with 85 additions and 10 deletions

View File

@@ -48,6 +48,12 @@ static int md5_exec(struct ast_channel *chan, void *data)
char *varname= NULL; /* Variable to set */
char *string = NULL; /* String to calculate on */
char retvar[50]; /* Return value */
static int dep_warning = 0;
if (!dep_warning) {
ast_log(LOG_WARNING, "This application has been deprecated, please use the MD5 function instead.\n");
dep_warning = 1;
}
if (!data) {
ast_log(LOG_WARNING, "Syntax: md5(<varname>=<string>) - missing argument!\n");
@@ -77,7 +83,13 @@ static int md5check_exec(struct ast_channel *chan, void *data)
char *hash= NULL; /* Hash to compare with */
char *string = NULL; /* String to calculate on */
char newhash[50]; /* Return value */
static int dep_warning = 0;
if (!dep_warning) {
ast_log(LOG_WARNING, "This application has been deprecated, please use the CHECK_MD5 function instead.\n");
dep_warning = 1;
}
if (!data) {
ast_log(LOG_WARNING, "Syntax: MD5Check(<md5hash>,<string>) - missing argument!\n");
return -1;