diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-12-11 20:06:43 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-12-11 20:06:43 +0000 |
commit | c79944aab87cec708c095761bdcb6b051d9ad32d (patch) | |
tree | 10a996e3e9d90439d414841be7f815c101b2d7a0 /res/res_monitor.c | |
parent | fb79f2259a6bebb680986b33e18d159bff8c6e7b (diff) |
Only look to see if options are set if some have been provided.
(closes issue #11505)
Reported by: Mike Anikienko
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@92365 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res/res_monitor.c')
-rw-r--r-- | res/res_monitor.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/res/res_monitor.c b/res/res_monitor.c index 94d3a6056..617b7b6fc 100644 --- a/res/res_monitor.c +++ b/res/res_monitor.c @@ -458,14 +458,16 @@ static int start_monitor_exec(struct ast_channel *chan, void *data) parse = ast_strdupa((char*)data); AST_STANDARD_APP_ARGS(args, parse); - if (strchr(args.options, 'm')) - stream_action |= X_JOIN; - if (strchr(args.options, 'b')) - waitforbridge = 1; - if (strchr(args.options, 'i')) - stream_action &= ~X_REC_IN; - if (strchr(args.options, 'o')) - stream_action &= ~X_REC_OUT; + if (!ast_strlen_zero(args.options)) { + if (strchr(args.options, 'm')) + stream_action |= X_JOIN; + if (strchr(args.options, 'b')) + waitforbridge = 1; + if (strchr(args.options, 'i')) + stream_action &= ~X_REC_IN; + if (strchr(args.options, 'o')) + stream_action &= ~X_REC_OUT; + } arg = strchr(args.format, ':'); if (arg) { |