From 63c5dfed398a9465fdb1942e0364fa1fdfb9e71b Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Wed, 3 Oct 2012 14:06:16 +0200 Subject: [PATCH] Unselect previous ICE valid pairs before adding losing pairs. --- coreapi/misc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/coreapi/misc.c b/coreapi/misc.c index e85005f28..935ec54f3 100644 --- a/coreapi/misc.c +++ b/coreapi/misc.c @@ -898,6 +898,10 @@ void linphone_core_update_ice_from_remote_media_description(LinphoneCall *call, int componentID = j + 1; if (candidate->addr[0] == '\0') break; get_default_addr_and_port(componentID, md, stream, &addr, &port); + if (j == 0) { + /* If we receive a re-invite and we finished ICE processing on our side, use the candidates given by the remote. */ + ice_check_list_unselect_valid_pairs(cl); + } ice_add_losing_pair(cl, j + 1, candidate->addr, candidate->port, addr, port); losing_pairs_added = TRUE; }