diff options
author | Leif Madsen <leif@leifmadsen.com> | 2011-07-14 20:28:54 +0000 |
---|---|---|
committer | Leif Madsen <leif@leifmadsen.com> | 2011-07-14 20:28:54 +0000 |
commit | a525edea595a782bcc3f868703ee85c794728614 (patch) | |
tree | 52207a5c4cce32b6f73fbc1cd41e9466b50ed841 /res/res_monitor.c | |
parent | 8dc71df9d0f74a8094553944b6bfcf3a64eed047 (diff) |
Merged revisions 328247 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.10
................
r328247 | lmadsen | 2011-07-14 16:25:31 -0400 (Thu, 14 Jul 2011) | 14 lines
Merged revisions 328209 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
........
r328209 | lmadsen | 2011-07-14 16:13:06 -0400 (Thu, 14 Jul 2011) | 6 lines
Introduce <support_level> tags in MODULEINFO.
This change introduces MODULEINFO into many modules in Asterisk in order to show
the community support level for those modules. This is used by changes committed
to menuselect by Russell Bryant recently (r917 in menuselect). More information about
the support level types and what they mean is available on the wiki at
https://wiki.asterisk.org/wiki/display/AST/Asterisk+Module+Support+States
........
................
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@328259 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_monitor.c')
-rw-r--r-- | res/res_monitor.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/res/res_monitor.c b/res/res_monitor.c index 86d1d1e02..61dc4a2d0 100644 --- a/res/res_monitor.c +++ b/res/res_monitor.c @@ -22,6 +22,10 @@ * * \author Mark Spencer <markster@digium.com> */ + +/*** MODULEINFO + <support_level>core</support_level> + ***/ #include "asterisk.h" @@ -650,6 +654,12 @@ static int start_monitor_exec(struct ast_channel *chan, const char *data) AST_APP_ARG(fname_base); AST_APP_ARG(options); ); + + /* Parse arguments. */ + if (ast_strlen_zero(data)) { + ast_log(LOG_ERROR, "Monitor requires an argument\n"); + return 0; + } parse = ast_strdupa(data); AST_STANDARD_APP_ARGS(args, parse); @@ -665,9 +675,7 @@ static int start_monitor_exec(struct ast_channel *chan, const char *data) stream_action &= ~X_REC_OUT; } - if (args.format) { - arg = strchr(args.format, ':'); - } + arg = strchr(args.format, ':'); if (arg) { *arg++ = 0; urlprefix = arg; |