]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
send event when removing floor flag
authorAnthony Minessale <anthm@freeswitch.org>
Wed, 25 Jan 2012 15:38:42 +0000 (09:38 -0600)
committerAnthony Minessale <anthm@freeswitch.org>
Wed, 25 Jan 2012 15:38:42 +0000 (09:38 -0600)
src/mod/applications/mod_conference/mod_conference.c

index 448784d642eed7d19788e1a1ca22ec26c25bd951..6671168915bc786d6eaede8bd2e9bd57f0606e63 100644 (file)
@@ -1101,6 +1101,14 @@ static switch_status_t conference_del_member(conference_obj_t *conference, confe
 
        if (member == member->conference->floor_holder) {
                member->conference->floor_holder = NULL;
+
+               if (test_eflag(conference, EFLAG_FLOOR_CHANGE)) {
+                       switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, CONF_EVENT_MAINT);
+                       switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Action", "floor-change");
+                       switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Old-ID", "%d", member->id);
+                       switch_event_add_header(event, SWITCH_STACK_BOTTOM, "New-ID", "none");
+                       switch_event_fire(&event);
+               }
        }
 
        member->conference = NULL;
@@ -1257,7 +1265,6 @@ static void *SWITCH_THREAD_FUNC conference_video_thread_run(switch_thread_t *thr
                switch_core_session_rwunlock(session);
 
                if (!SWITCH_READ_ACCEPTABLE(status)) {
-                       conference->floor_holder = NULL;
                        goto do_continue;
                }