]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Prepare for removal of DBGet/DBPut manager commands, by allowing Getvar to get functi...
authorTilghman Lesher <tilghman@meg.abyt.es>
Sun, 15 Jan 2006 05:50:19 +0000 (05:50 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Sun, 15 Jan 2006 05:50:19 +0000 (05:50 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8078 65c4cc65-6c06-0410-ace0-fbb531ad65f3

manager.c

index 541989cc995f394034d67c00bbbac9a117bda0f7..d58b48831fbac6717a734a1903bacd460ea0d906 100644 (file)
--- a/manager.c
+++ b/manager.c
@@ -745,7 +745,11 @@ static int action_getvar(struct mansession *s, struct message *m)
                }
        }
 
-       pbx_retrieve_variable(c, varname, &varval, workspace, sizeof(workspace), NULL);
+       if (varname[strlen(varname) - 1] == ')') {
+               varval = ast_func_read(c, varname, workspace, sizeof(workspace));
+       } else {
+               pbx_retrieve_variable(c, varname, &varval, workspace, sizeof(workspace), NULL);
+       }
 
        if (c)
                ast_mutex_unlock(&c->lock);