diff --git a/apps/app_math.c b/apps/app_math.c index f9e26e6994b2642b707b372e41e6a8d530fb1526..630d17b5de1128b73713b661a0f76c37173d1acf 100755 --- a/apps/app_math.c +++ b/apps/app_math.c @@ -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;