diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-12-15 15:35:51 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-12-15 15:35:51 +0000 |
commit | 2ee8174805eb52a48419da674b8a02dfccc79f19 (patch) | |
tree | d993acc9e7d990872bb3751c6a398983f759ce9b | |
parent | 20df67762ded557bdb52a671888daa44ebd96615 (diff) |
Merged revisions 235053 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r235053 | tilghman | 2009-12-15 09:33:49 -0600 (Tue, 15 Dec 2009) | 11 lines
Merged revisions 235052 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r235052 | tilghman | 2009-12-15 09:29:24 -0600 (Tue, 15 Dec 2009) | 4 lines
Mandatory argument checking
(closes issue #16446)
Reported by: nicchap
........
................
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@235056 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | res/res_agi.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/res/res_agi.c b/res/res_agi.c index e5b8b79e9..703bb00d9 100644 --- a/res/res_agi.c +++ b/res/res_agi.c @@ -1978,6 +1978,9 @@ static int handle_noop(struct ast_channel *chan, AGI *agi, int arg, char *argv[] static int handle_setmusic(struct ast_channel *chan, AGI *agi, int argc, char *argv[]) { + if (argc < 3) { + return RESULT_SHOWUSAGE; + } if (!strncasecmp(argv[2], "on", 2)) ast_moh_start(chan, argc > 3 ? argv[3] : NULL, NULL); else if (!strncasecmp(argv[2], "off", 3)) |