]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Make the deprecation warning inline with the code, instead of only in documentation...
authorTilghman Lesher <tilghman@meg.abyt.es>
Fri, 24 Aug 2007 15:41:43 +0000 (15:41 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Fri, 24 Aug 2007 15:41:43 +0000 (15:41 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@80747 65c4cc65-6c06-0410-ace0-fbb531ad65f3

UPGRADE.txt
main/pbx.c

index b54e3f0afc4a69020d847dbf953d6b1e0612af78..c5b752a30ef8d1a08446731a02484a054209225f 100644 (file)
@@ -130,7 +130,9 @@ Applications:
   interpolation falling back to globals when no channel variable is set.
 
 * The application SetVar has been renamed to Set.  The syntax SetVar was marked
-  deprecated in version 1.2 and is no longer recognized in this version.
+  deprecated in version 1.2 and is no longer recognized in this version.  The
+  use of Set with multiple argument pairs has also been deprecated.  Please
+  separate each name/value pair into its own dialplan line.
 
 * app_read has been updated to use the newer options codes, using "skip" or
   "noanswer" will not work.  Use s or n.  Also there is a new feature i, for
index 11b614583267778985c7858daa5dcbaf61a433c4..f3dcea8c7c10db1fcf5c9d6e314eedc312d7d3a9 100644 (file)
@@ -5857,10 +5857,15 @@ int pbx_builtin_setvar(struct ast_channel *chan, void *data)
        /* check for a trailing flags argument */
        if ((argc > 1) && !strchr(argv[argc-1], '=')) {
                argc--;
-               if (strchr(argv[argc], 'g'))
+               if (strchr(argv[argc], 'g')) {
+                       ast_log(LOG_WARNING, "The use of the 'g' flag is deprecated.  Please use Set(GLOBAL(foo)=bar) instead\n");
                        global = 1;
+               }
        }
 
+       if (argc > 1)
+               ast_log(LOG_WARNING, "Setting multiple variables at once within Set is deprecated.  Please separate each name/value pair into its own line.\n");
+
        for (x = 0; x < argc; x++) {
                name = argv[x];
                if ((value = strchr(name, '='))) {