From bb80550705c3f03e5c27671b2dc781f8c61f1d1c Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Wed, 1 Aug 2012 11:34:51 +0200 Subject: [PATCH] Delete ICE session, when its state is Failed after receiving an answer from the peer (probably caused by ice-mismatch attributes). --- coreapi/sal_eXosip2_sdp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/coreapi/sal_eXosip2_sdp.c b/coreapi/sal_eXosip2_sdp.c index bf6c196a9..1d25d1f51 100644 --- a/coreapi/sal_eXosip2_sdp.c +++ b/coreapi/sal_eXosip2_sdp.c @@ -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;