[Freeswitch-svn] [commit] r6085 - freeswitch/trunk/src/mod/applications/mod_conference
Freeswitch SVN
mikej at freeswitch.org
Mon Oct 29 14:18:14 EDT 2007
Author: mikej
Date: Mon Oct 29 14:18:13 2007
New Revision: 6085
Modified:
freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c
Log:
be more careful about not dereferencing NULL (attempt to fix MODAPP-45)
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 Mon Oct 29 14:18:13 2007
@@ -350,11 +350,19 @@
static switch_status_t conference_add_event_member_data(conference_member_t * member, switch_event_t *event)
{
switch_status_t status = SWITCH_STATUS_SUCCESS;
- switch_channel_t *channel = switch_core_session_get_channel(member->session);
- switch_channel_event_set_data(channel, event);
+
+ if (member) {
+ if (member->session) {
+ switch_channel_t *channel = switch_core_session_get_channel(member->session);
+ switch_channel_event_set_data(channel, event);
+ }
- status = conference_add_event_data(member->conference, event);
- switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Member-ID", "%u", member->id);
+ if (member->conference) {
+ status = conference_add_event_data(member->conference, event);
+ }
+
+ switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Member-ID", "%u", member->id);
+ }
return status;
}
More information about the Freeswitch-svn
mailing list