Skip to content

Commit

Permalink
Add an additional check for participant->room ptr in audiobridge plug…
Browse files Browse the repository at this point in the history
…in handler (#2432).
  • Loading branch information
atoppi committed Nov 11, 2020
1 parent 817f536 commit cd20d6c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions plugins/janus_audiobridge.c
Original file line number Diff line number Diff line change
Expand Up @@ -6292,6 +6292,14 @@ static void *janus_audiobridge_handler(void *data) {
msg = NULL;
continue;
}
if(participant == NULL || participant->room == NULL) {
JANUS_LOG(LOG_ERR, "Can't handle SDP (not in a room)\n");
error_code = JANUS_AUDIOBRIDGE_ERROR_NOT_JOINED;
g_snprintf(error_cause, 512, "Can't handle SDP (not in a room)");
if(sdp)
janus_sdp_destroy(sdp);
goto error;
}
/* We use a custom session name in the SDP */
char s_name[100];
g_snprintf(s_name, sizeof(s_name), "AudioBridge %s", participant->room->room_id_str);
Expand Down

0 comments on commit cd20d6c

Please sign in to comment.