]> sjero.net Git - linphone/commitdiff
Unselect previous ICE valid pairs before adding losing pairs.
authorGhislain MARY <ghislain.mary@belledonne-communications.com>
Wed, 3 Oct 2012 12:06:16 +0000 (14:06 +0200)
committerGhislain MARY <ghislain.mary@belledonne-communications.com>
Wed, 3 Oct 2012 12:11:05 +0000 (14:11 +0200)
coreapi/misc.c

index e85005f28aa398bcf0200783f9a88cf12953eb46..935ec54f35de4d4e7403270f15dcd75633db06da 100644 (file)
@@ -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;
                                        }