diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-05-04 04:05:34 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-05-04 04:05:34 +0000 |
commit | ce9a0b7459733b1c74d196f6076fdd77858596a9 (patch) | |
tree | ef383426d6a691d67f95b3285a996b13754ccd21 /apps | |
parent | 1d2cc0bca445bdfd8a45920b6f52553215ca5414 (diff) |
add MD5 and CHECK_MD5 functions, deprecate MD5 and MD5Check apps (bug #4123)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5567 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rwxr-xr-x | apps/app_md5.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/apps/app_md5.c b/apps/app_md5.c index dfc8dd5db..369e683b2 100755 --- a/apps/app_md5.c +++ b/apps/app_md5.c @@ -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; |