Commit 36aa468c authored by Fabrice Bellet's avatar Fabrice Bellet Committed by Olivier Crête

agent: reset remote credentials when restarting ice

The remote credentials recorded in the streams should be reset,
in the case the restarted conncheck begins with new remote candidates
*before* the updated remote credentials are received.
parent b20ac5ba
......@@ -117,6 +117,13 @@ nice_stream_initialize_credentials (NiceStream *stream, NiceRNG *rng)
* '"ice-ufrag" and "ice-pwd" Attributes', ID-19) */
nice_rng_generate_bytes_print (rng, NICE_STREAM_DEF_UFRAG - 1, stream->local_ufrag);
nice_rng_generate_bytes_print (rng, NICE_STREAM_DEF_PWD - 1, stream->local_password);
/* reset remote credentials, because we cannot assume that we'll
* receive new remote credentials from the SDP before the conncheck
* restarts with new inbound STUN requests
*/
stream->remote_ufrag[0] = 0;
stream->remote_password[0] = 0;
}
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment