diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-05-28 15:10:19 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-05-28 15:10:19 +0000 |
commit | 42d036b2d19fea144f004efb7822821c99ad2a2d (patch) | |
tree | 12fe06076c0a473f066a3047bc8cf238b9f367c3 /pbx.c | |
parent | 7c08dc20b84e358b08fe232086630e675a55423c (diff) |
Deprecate SetGlobalVar, replacing it with a dialplan function
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@30677 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx.c')
-rw-r--r-- | pbx.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -5473,6 +5473,7 @@ static int pbx_builtin_setglobalvar(struct ast_channel *chan, void *data) { char *name; char *stringp = data; + static int dep_warning = 0; if (ast_strlen_zero(data)) { ast_log(LOG_WARNING, "Ignoring, since there is no variable to set\n"); @@ -5480,6 +5481,12 @@ static int pbx_builtin_setglobalvar(struct ast_channel *chan, void *data) } name = strsep(&stringp, "="); + + if (!dep_warning) { + dep_warning = 1; + ast_log(LOG_WARNING, "SetGlobalVar is deprecated. Please use Set(GLOBAL(%s)=%s) instead.\n", name, stringp); + } + /*! \todo XXX watch out, leading whitespace ? */ pbx_builtin_setvar_helper(NULL, name, stringp); |