]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-10255: [freeswitch-core] "complete" sqlite table grows indefinitely when video...
authorAnthony Minessale <anthm@freeswitch.org>
Thu, 20 Apr 2017 18:06:31 +0000 (13:06 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Thu, 20 Apr 2017 18:06:38 +0000 (13:06 -0500)
src/mod/applications/mod_conference/conference_video.c

index 1c4d67d2223ba28fbae4b7c62c3705e8ce82850f..7c6fc094e27bb10da29985a17526c2c7bbc998a7 100644 (file)
@@ -62,6 +62,7 @@ int conference_video_set_fps(conference_obj_t *conference, float fps)
        return 1;
 }
 
+static int COMPLETE_INIT = 0;
 
 void conference_video_parse_layouts(conference_obj_t *conference, int WIDTH, int HEIGHT)
 {
@@ -272,10 +273,17 @@ void conference_video_parse_layouts(conference_obj_t *conference, int WIDTH, int
                                }
 
                                switch_core_hash_insert(conference->layout_hash, name, vlayout);
-                               switch_snprintf(cmd_str, sizeof(cmd_str), "add conference ::conference::conference_list_conferences vid-layout %s", name);
-                               switch_console_set_complete(cmd_str);
+                               
+                               if (!COMPLETE_INIT) {
+                                       switch_mutex_lock(conference_globals.hash_mutex);
+                                       if (!COMPLETE_INIT) {
+                                               switch_snprintf(cmd_str, sizeof(cmd_str), "add conference ::conference::conference_list_conferences vid-layout %s", name);
+                                               switch_console_set_complete(cmd_str);
+                                               COMPLETE_INIT++;
+                                       }
+                                       switch_mutex_unlock(conference_globals.hash_mutex);
+                               }
                        }
-
                }
 
                if ((x_groups = switch_xml_child(x_layout_settings, "groups"))) {