From: Michael Jerris Date: Fri, 5 Jun 2009 16:16:56 +0000 (+0000) Subject: mod_conference: don't transfer back to the same conference X-Git-Tag: v1.0.4~605 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d2821be945fefd89c8716ceb1f4c5bc86156ea98;p=thirdparty%2Ffreeswitch.git mod_conference: don't transfer back to the same conference git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13638 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/src/mod/applications/mod_conference/mod_conference.c b/src/mod/applications/mod_conference/mod_conference.c index b5f6104ed0..742b175e5d 100644 --- a/src/mod/applications/mod_conference/mod_conference.c +++ b/src/mod/applications/mod_conference/mod_conference.c @@ -3933,15 +3933,17 @@ static switch_status_t conf_api_sub_transfer(conference_obj_t *conference, switc /* move the member from the old conference to the new one */ switch_mutex_lock(member->control_mutex); - conference_del_member(conference, member); - conference_add_member(new_conference, member); + if (conference != new_conference) { + conference_del_member(conference, member); + conference_add_member(new_conference, member); - if (conference->rate != new_conference->rate) { - if (setup_media(member, new_conference)) { - switch_clear_flag_locked(member, MFLAG_RUNNING); - } else { - switch_channel_set_app_flag(channel, CF_APP_TAGGED); - switch_set_flag_locked(member, MFLAG_RESTART); + if (conference->rate != new_conference->rate) { + if (setup_media(member, new_conference)) { + switch_clear_flag_locked(member, MFLAG_RUNNING); + } else { + switch_channel_set_app_flag(channel, CF_APP_TAGGED); + switch_set_flag_locked(member, MFLAG_RESTART); + } } }