]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Making sure a char ptr is initialized before we strchr on it is a GOOD thing. Ya...
authorBJ Weschke <bweschke@btwtech.com>
Thu, 25 May 2006 13:51:44 +0000 (13:51 +0000)
committerBJ Weschke <bweschke@btwtech.com>
Thu, 25 May 2006 13:51:44 +0000 (13:51 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30194 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_queue.c

index 9b75d11d05c189a7387699f76563c3917c1c9f37..d42f20e85744cb7aea51a5a50609d945d6bafb58 100644 (file)
@@ -2389,14 +2389,15 @@ static int try_calling(struct queue_ent *qe, const char *options, char *announce
                                        ast_log(LOG_WARNING, "monitor-format (in queues.conf) and MONITOR_FILENAME cannot contain a '|'! Not recording.\n");
                                        mixmonapp = NULL;
                                }
+
+                               if (!monitor_options)
+                                       monitor_options = ast_strdupa("");
                                
                                if (strchr(monitor_options, '|')) {
                                        ast_log(LOG_WARNING, "MONITOR_OPTIONS cannot contain a '|'! Not recording.\n");
                                        mixmonapp = NULL;
                                }
 
-                               if (!monitor_options)
-                                       monitor_options = ast_strdupa("");
 
                                if (mixmonapp) {
                                        if (!ast_strlen_zero(monitor_exec) && !ast_strlen_zero(monitor_options))