Deprecate SetGlobalVar, replacing it with a dialplan function

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30677 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Tilghman Lesher
2006-05-28 15:10:19 +00:00
parent 1617adb055
commit 92314f96c5
3 changed files with 211 additions and 0 deletions

7
pbx.c
View File

@@ -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);