Skip to content

Commit d22aec6

Browse files
adnanelaelezovic
andauthored
[mod_conference] Avoid race conditions touching conference->variables without a mutex.
Co-authored-by: aelezovic <adnan.elezovic@infobip.com>
1 parent 7f9dd27 commit d22aec6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/mod/applications/mod_conference/conference_event.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -748,7 +748,9 @@ switch_status_t conference_event_add_data(conference_obj_t *conference, switch_e
748748
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Conference-Ghosts", "%u", conference->count_ghosts);
749749
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Conference-Profile-Name", conference->profile_name);
750750
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Conference-Unique-ID", conference->uuid_str);
751+
switch_mutex_lock(conference->flag_mutex);
751752
switch_event_merge(event, conference->variables);
753+
switch_mutex_unlock(conference->flag_mutex);
752754

753755
return status;
754756
}

0 commit comments

Comments
 (0)