diff options
author | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-10-16 23:37:37 +0000 |
---|---|---|
committer | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-10-16 23:37:37 +0000 |
commit | 786847188106f1ca178ea2b6b44edf3b459f843e (patch) | |
tree | 342cc2f8406c1f6d2e69cb494b8daa31e3d697ff /main/manager.c | |
parent | 5935500e1cf7b710fc955a7e29a8ae08ef229ec3 (diff) |
Merged revisions 150302 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r150302 | mmichelson | 2008-10-16 18:36:49 -0500 (Thu, 16 Oct 2008) | 24 lines
Merged revisions 150298,150301 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r150298 | mmichelson | 2008-10-16 18:34:37 -0500 (Thu, 16 Oct 2008) | 10 lines
Don't try to call a dialplan function's read callback from
the manager's GetVar handler if an invalid channel has
been specified. Several dialplan functions, including
CHANNEL and SIP_HEADER, do not check for NULL-ness of
the channel being passed in.
(closes issue #13715)
Reported by: makoto
........
r150301 | mmichelson | 2008-10-16 18:35:07 -0500 (Thu, 16 Oct 2008) | 3 lines
And don't forget to return on the error condition
........
................
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@150303 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/manager.c')
-rw-r--r-- | main/manager.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/main/manager.c b/main/manager.c index 5dbc781e9..623bf853e 100644 --- a/main/manager.c +++ b/main/manager.c @@ -1804,6 +1804,10 @@ static int action_getvar(struct mansession *s, const struct message *m) } if (varname[strlen(varname) - 1] == ')') { + if (!c) { + astman_send_error(s, m, "No such channel"); + return 0; + } ast_func_read(c, (char *) varname, workspace, sizeof(workspace)); varval = workspace; } else { |