Fix situation for when there is no monitor_option defined, but there is a monitor_ex...
authorBJ Weschke <bweschke@btwtech.com>
Mon, 8 May 2006 12:30:46 +0000 (12:30 +0000)
committerBJ Weschke <bweschke@btwtech.com>
Mon, 8 May 2006 12:30:46 +0000 (12:30 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25487 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_queue.c

index 4e960d2..4f5d3e3 100644 (file)
@@ -2365,13 +2365,14 @@ static int try_calling(struct queue_ent *qe, const char *options, char *announce
                                        mixmonapp = NULL;
                                }
 
+                               if (!monitor_options)
+                                       monitor_options = ast_strdupa("");
+
                                if (mixmonapp) {
                                        if (!ast_strlen_zero(monitor_exec) && !ast_strlen_zero(monitor_options)) 
                                                snprintf(mixmonargs, sizeof(mixmonargs)-1, "%s|b%s|%s", tmpid2, monitor_options, monitor_exec);
-                                       else if (!ast_strlen_zero(monitor_options)) 
-                                               snprintf(mixmonargs, sizeof(mixmonargs)-1, "%s|b%s", tmpid2, monitor_options);
                                        else 
-                                               snprintf(mixmonargs, sizeof(mixmonargs)-1, "%s|b", tmpid2);
+                                               snprintf(mixmonargs, sizeof(mixmonargs)-1, "%s|b%s", tmpid2, monitor_options);
                                                
                                        if (option_debug)
                                                ast_log(LOG_DEBUG, "Arguments being passed to MixMonitor: %s\n", mixmonargs);