Skip to content

Commit

Permalink
Set new remote credentials after restarting ICE (fixes #2672) (#2729)
Browse files Browse the repository at this point in the history
  • Loading branch information
lminiero authored Jul 15, 2021
1 parent dc46d99 commit 67b7774
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions janus.c
Original file line number Diff line number Diff line change
Expand Up @@ -1520,17 +1520,17 @@ int janus_process_incoming_request(janus_request *request) {
}
if(janus_flags_is_set(&handle->webrtc_flags, JANUS_ICE_HANDLE_WEBRTC_ICE_RESTART)) {
JANUS_LOG(LOG_INFO, "[%"SCNu64"] Restarting ICE...\n", handle->handle_id);
/* Update remote credentials for ICE */
if(handle->stream) {
nice_agent_set_remote_credentials(handle->agent, handle->stream->stream_id,
handle->stream->ruser, handle->stream->rpass);
}
/* FIXME We only need to do that for offers: if it's an answer, we did that already */
if(offer) {
janus_ice_restart(handle);
} else {
janus_flags_clear(&handle->webrtc_flags, JANUS_ICE_HANDLE_WEBRTC_ICE_RESTART);
}
/* Update remote credentials for ICE */
if(handle->stream) {
nice_agent_set_remote_credentials(handle->agent, handle->stream->stream_id,
handle->stream->ruser, handle->stream->rpass);
}
/* If we're full-trickling, we'll need to resend the candidates later */
if(janus_ice_is_full_trickle_enabled()) {
janus_flags_set(&handle->webrtc_flags, JANUS_ICE_HANDLE_WEBRTC_RESEND_TRICKLES);
Expand Down

0 comments on commit 67b7774

Please sign in to comment.