]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Only look to see if options are set if some have been provided.
authorJoshua Colp <jcolp@digium.com>
Tue, 11 Dec 2007 20:06:43 +0000 (20:06 +0000)
committerJoshua Colp <jcolp@digium.com>
Tue, 11 Dec 2007 20:06:43 +0000 (20:06 +0000)
(closes issue #11505)
Reported by: Mike Anikienko

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@92365 65c4cc65-6c06-0410-ace0-fbb531ad65f3

res/res_monitor.c

index 94d3a605653fe01b4af8cfe9bc96e93dab758e3c..617b7b6fc35a250599fedf80dcb20f014ba3cecc 100644 (file)
@@ -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) {