Skip to content

Commit

Permalink
Check room pointer before notifying a join.
Browse files Browse the repository at this point in the history
  • Loading branch information
atoppi committed Aug 23, 2019
1 parent 5c5b736 commit 30dcef9
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions plugins/janus_videoroom.c
Original file line number Diff line number Diff line change
Expand Up @@ -4159,9 +4159,11 @@ void janus_videoroom_setup_media(janus_plugin_session *handle) {
json_object_set_new(pub, "videoroom", json_string("event"));
json_object_set_new(pub, "room", json_integer(participant->room_id));
json_object_set_new(pub, "publishers", list);
janus_mutex_lock(&participant->room->mutex);
janus_videoroom_notify_participants(participant, pub);
janus_mutex_unlock(&participant->room->mutex);
if (participant->room) {
janus_mutex_lock(&participant->room->mutex);
janus_videoroom_notify_participants(participant, pub);
janus_mutex_unlock(&participant->room->mutex);
}
json_decref(pub);
/* Also notify event handlers */
if(notify_events && gateway->events_is_enabled()) {
Expand Down

0 comments on commit 30dcef9

Please sign in to comment.