From 1eeba1f85e927cae2c26ca64ecf9411a64387909 Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Fri, 15 Aug 2008 04:07:33 +0000 Subject: [PATCH] attempt to fix MODAPP-129, seg when kicking many conference members quickly git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9302 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- .../applications/mod_conference/mod_conference.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/mod/applications/mod_conference/mod_conference.c b/src/mod/applications/mod_conference/mod_conference.c index 4029d98920..7dd4caf0ac 100644 --- a/src/mod/applications/mod_conference/mod_conference.c +++ b/src/mod/applications/mod_conference/mod_conference.c @@ -2828,11 +2828,12 @@ static switch_status_t conf_api_sub_kick(conference_member_t *member, switch_str if (stream != NULL) { stream->write_function(stream, "OK kicked %u\n", member->id); } - if (test_eflag(member->conference, EFLAG_KICK_MEMBER) && - switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, CONF_EVENT_MAINT) == SWITCH_STATUS_SUCCESS) { - conference_add_event_member_data(member, event); - switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Action", "kick-member"); - switch_event_fire(&event); + if (member->conference && test_eflag(member->conference, EFLAG_KICK_MEMBER)) { + if (switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, CONF_EVENT_MAINT) == SWITCH_STATUS_SUCCESS) { + conference_add_event_member_data(member, event); + switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Action", "kick-member"); + switch_event_fire(&event); + } } return SWITCH_STATUS_SUCCESS; } @@ -3662,7 +3663,7 @@ switch_status_t conf_api_dispatch(conference_obj_t *conference, switch_stream_ha conference_member_t *member = conference_member_get(conference, id); if (member != NULL) { - pfn(conference_member_get(conference, id), stream, argv[argn + 2]); + pfn(member, stream, argv[argn + 2]); } else { stream->write_function(stream, "Non-Existant ID %u\n", id); }