- if ((*ice_session != NULL) && ice_session_check_list(*ice_session, i)) {
- if (ice_remote_candidates != NULL) {
- char ip[64];
- unsigned int port;
- unsigned int componentID;
- int offset;
-
- while (3 == sscanf(ice_remote_candidates, "%u %s %u%n", &componentID, ip, &port, &offset)) {
- if (componentID == 1) {
- if ((stream->rtp_addr == NULL) || (stream->rtp_addr[0] == '\0')) rtp_addr = desc->addr;
- else rtp_addr = stream->rtp_addr;
- ice_add_losing_pair(ice_session_check_list(*ice_session, i), componentID, ip, port, rtp_addr, stream->rtp_port);
- } else if (componentID == 2) {
- if ((stream->rtcp_addr == NULL) || (stream->rtcp_addr[0] == '\0')) rtp_addr = desc->addr;
- else rtp_addr = stream->rtcp_addr;
- ice_add_losing_pair(ice_session_check_list(*ice_session, i), componentID, ip, port, rtp_addr, stream->rtcp_port);
- }
- ice_remote_candidates += offset;
- if (ice_remote_candidates[offset] == ' ') ice_remote_candidates += 1;
- }
- }
- if ((ice_ufrag != NULL) && (ice_pwd != NULL)) {
- ice_check_list_set_remote_credentials(ice_session_check_list(*ice_session, i), ice_ufrag, ice_pwd);
- }
- if (stream->rtp_port == 0) {
- /* This stream has been deactivated by the peer, delete the check list. */
- ice_session_remove_check_list(*ice_session, ice_session_check_list(*ice_session, i));
- }
- ice_dump_candidates(ice_session_check_list(*ice_session, i));
- }