Delete ICE session, when its state is Failed after receiving an answer from the peer (probably caused by ice-mismatch attributes).

This commit is contained in:
Ghislain MARY 2012-08-01 11:34:51 +02:00
parent 8e50e1c2bd
commit bb80550705

View file

@ -709,7 +709,8 @@ int sdp_to_media_description(sdp_message_t *msg, SalMediaDescription *desc, IceS
ice_session_set_remote_credentials(*ice_session, ice_ufrag, ice_pwd);
ice_dump_session(*ice_session);
}
if ((ice_session_just_created == FALSE) && ((ice_ufrag == NULL) || (ice_pwd == NULL))) {
if (((ice_session_just_created == FALSE) && ((ice_ufrag == NULL) || (ice_pwd == NULL)))
|| (ice_session_state(*ice_session) == IS_Failed)) {
/* We started with ICE activated but the peer apparently do not support ICE, so stop using it. */
ice_session_destroy(*ice_session);
*ice_session = NULL;