@ -1142,6 +1142,8 @@ static void __fill_stream(struct packet_stream *ps, const struct endpoint *epp,
}
}
void call_stream_crypto_reset ( struct packet_stream * ps ) {
void call_stream_crypto_reset ( struct packet_stream * ps ) {
ilog ( LOG_DEBUG , " Resetting crypto context " ) ;
crypto_reset ( & ps - > crypto ) ;
crypto_reset ( & ps - > crypto ) ;
mutex_lock ( & ps - > in_lock ) ;
mutex_lock ( & ps - > in_lock ) ;
@ -1226,6 +1228,8 @@ int __init_stream(struct packet_stream *ps) {
if ( dtls_conn )
if ( dtls_conn )
dtls_active = dtls_is_active ( dtls_conn ) ;
dtls_active = dtls_is_active ( dtls_conn ) ;
}
}
else
dtls_shutdown ( ps ) ;
if ( MEDIA_ISSET ( media , SDES ) & & dtls_active = = - 1 ) {
if ( MEDIA_ISSET ( media , SDES ) & & dtls_active = = - 1 ) {
for ( GList * l = ps - > sfds . head ; l ; l = l - > next ) {
for ( GList * l = ps - > sfds . head ; l ; l = l - > next ) {
@ -1646,8 +1650,10 @@ static void __generate_crypto(const struct sdp_ng_flags *flags, struct call_medi
else {
else {
/* if both SDES and DTLS are supported, we may use the flags to select one
/* if both SDES and DTLS are supported, we may use the flags to select one
* over the other */
* over the other */
if ( MEDIA_ARESET2 ( this , DTLS , SDES ) & & flags - > dtls_off )
if ( MEDIA_ARESET2 ( this , DTLS , SDES ) & & flags - > dtls_off ) {
MEDIA_CLEAR ( this , DTLS ) ;
MEDIA_CLEAR ( this , DTLS ) ;
this - > fingerprint . hash_func = NULL ;
}
/* flags->sdes_off is ignored as we prefer DTLS by default */
/* flags->sdes_off is ignored as we prefer DTLS by default */
/* if we're talking to someone understanding DTLS, then skip the SDES stuff */
/* if we're talking to someone understanding DTLS, then skip the SDES stuff */