From: Kevin P. Fleming Date: Fri, 5 Jan 2007 23:31:38 +0000 (+0000) Subject: ast_func_read() needs a writable copy of the function name to be passed X-Git-Tag: 1.4.1~321 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d2d50d7a8e1832b70db3c0dbc41fff55e9f3c367;p=thirdparty%2Fasterisk.git ast_func_read() needs a writable copy of the function name to be passed git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@49710 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/main/manager.c b/main/manager.c index 03b0a17314..edad0d3fe0 100644 --- a/main/manager.c +++ b/main/manager.c @@ -1368,7 +1368,9 @@ static int action_getvar(struct mansession *s, const struct message *m) } if (varname[strlen(varname) - 1] == ')') { - ast_func_read(c, (char *) varname, workspace, sizeof(workspace)); + char *copy = ast_strdupa(varname); + + ast_func_read(c, copy, workspace, sizeof(workspace)); } else { pbx_retrieve_variable(c, varname, &varval, workspace, sizeof(workspace), NULL); }