Skip to content
Snippets Groups Projects
Commit bef7d9da authored by Russell Bryant's avatar Russell Bryant
Browse files

move deprecation warning until after all variable declarations (bug #4514)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5900 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent 0aae1925
No related branches found
No related tags found
No related merge requests found
......@@ -82,11 +82,6 @@ static int math_exec(struct ast_channel *chan, void *data)
int iaction=-1;
static int deprecation_warning = 0;
if (!deprecation_warning) {
ast_log(LOG_WARNING, "Math() is deprecated, please use Set(var=${MATH(...)} instead.\n");
deprecation_warning = 1;
}
/* dunno, big calulations :D */
char user_result[30];
......@@ -95,6 +90,11 @@ static int math_exec(struct ast_channel *chan, void *data)
struct localuser *u;
if (!deprecation_warning) {
ast_log(LOG_WARNING, "Math() is deprecated, please use Set(var=${MATH(...)} instead.\n");
deprecation_warning = 1;
}
if (!data) {
ast_log(LOG_WARNING, "No parameters passed. !\n");
return -1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment