[mod_conference] Avoid race conditions touching conference->variables without a mutex.

Co-authored-by: aelezovic <adnan.elezovic@infobip.com>
This commit is contained in:
Adnan Elezovic
2025-08-14 11:27:28 +02:00
committed by GitHub
parent 7f9dd270b4
commit d22aec67c6

View File

@@ -748,7 +748,9 @@ switch_status_t conference_event_add_data(conference_obj_t *conference, switch_e
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Conference-Ghosts", "%u", conference->count_ghosts); switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Conference-Ghosts", "%u", conference->count_ghosts);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Conference-Profile-Name", conference->profile_name); switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Conference-Profile-Name", conference->profile_name);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Conference-Unique-ID", conference->uuid_str); switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Conference-Unique-ID", conference->uuid_str);
switch_mutex_lock(conference->flag_mutex);
switch_event_merge(event, conference->variables); switch_event_merge(event, conference->variables);
switch_mutex_unlock(conference->flag_mutex);
return status; return status;
} }