[Freeswitch-svn] [commit] r6058 - freeswitch/trunk/src/mod/applications/mod_conference

Freeswitch SVN anthm at freeswitch.org
Thu Oct 25 17:02:31 EDT 2007


Author: anthm
Date: Thu Oct 25 17:02:31 2007
New Revision: 6058

Modified:
   freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c

Log:
fix MODAPP-22

Modified: freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c	(original)
+++ freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c	Thu Oct 25 17:02:31 2007
@@ -491,8 +491,9 @@
 	switch_mutex_lock(member->audio_in_mutex);
 	switch_mutex_lock(member->audio_out_mutex);
 	switch_mutex_lock(member->flag_mutex);
-
 	switch_mutex_lock(conference->member_mutex);
+
+	switch_clear_flag(conference, CFLAG_DESTRUCT);
 	member->conference = conference;
 	member->next = conference->members;
 	member->energy_level = conference->energy_level;
@@ -4149,7 +4150,7 @@
 				goto done;
 			}
 		}
-
+		
 		if (conference->special_announce) {
 			conference_local_play_file(conference, session, conference->special_announce, CONF_DEFAULT_LEADIN);
 		}
@@ -4326,6 +4327,14 @@
 	switch_buffer_destroy(&member.audio_buffer);
 	switch_buffer_destroy(&member.mux_buffer);
 
+	if (conference) {
+		switch_mutex_lock(conference->mutex);
+		if (switch_test_flag(conference, CFLAG_DYNAMIC) && conference->count == 0) {
+			switch_set_flag_locked(conference, CFLAG_DESTRUCT);
+		}
+		switch_mutex_unlock(conference->mutex);
+	}
+
 	/* Release the config registry handle */
 	if (cxml) {
 		switch_xml_free(cxml);



More information about the Freeswitch-svn mailing list