]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fix: Meetme recording variables from realtime DB use null entries over channel variables
authorJonathan Rose <jrose@digium.com>
Wed, 7 Dec 2011 20:27:59 +0000 (20:27 +0000)
committerJonathan Rose <jrose@digium.com>
Wed, 7 Dec 2011 20:27:59 +0000 (20:27 +0000)
Meetme would attempt to substitute the realtime values of RECORDING_FILE and
RECORDING_FORMAT from the meetme db entry instead of using the channel variable set
for those variables in spite of those database entries being NULL or even lacking
a column to represent them.

(closes issue ASTERISK-18873)
Reported by: Byron Clark
Patches:
ASTERISK-18873-1.patch uploaded by Byron Clark (license 6157)
........

Merged revisions 347369 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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

apps/app_meetme.c

index 875419106a9187775c57edad22d57fca78f2509c..5cfe5f3470303154e009785498aaab360589bddb 100644 (file)
@@ -4014,8 +4014,12 @@ static struct ast_conference *find_conf_realtime(struct ast_channel *chan, char
                        cnf->useropts = ast_strdup(useropts);
                        cnf->adminopts = ast_strdup(adminopts);
                        cnf->bookid = ast_strdup(bookid);
-                       cnf->recordingfilename = ast_strdup(recordingfilename);
-                       cnf->recordingformat = ast_strdup(recordingformat);
+                       if (!ast_strlen_zero(recordingfilename)) {
+                               cnf->recordingfilename = ast_strdup(recordingfilename);
+                       }
+                       if (!ast_strlen_zero(recordingformat)) {
+                               cnf->recordingformat = ast_strdup(recordingformat);
+                       }
 
                        /* Parse the other options into confflags -- need to do this in two
                         * steps, because the parse_options routine zeroes the buffer. */