Skip to content
Snippets Groups Projects
Commit 5e453368 authored by Mohamed Chibani's avatar Mohamed Chibani
Browse files

ice: resort the check list when adding prflx candidates

fixes commit b954f3b5

Gitlab: #617

Change-Id: I82b6f9f229b173279bfcd3c200b73690d752b670
parent 7357589e
No related branches found
No related tags found
No related merge requests found
From 45430f86d00f60c439f936693bf033ff4c066329 Mon Sep 17 00:00:00 2001
From: Mohamed Chibani <mohamed.chibani@savoirfairelinux.com>
Date: Thu, 26 Aug 2021 10:49:20 -0400
Subject: [PATCH] resort check list after adding prflx
From 328a6837cc739440ed9c9abe18a43a36d3c4a60d Mon Sep 17 00:00:00 2001
From: sauwming <ming@teluu.com>
Date: Mon, 30 Aug 2021 11:45:52 +0800
Subject: [PATCH 1/2] Resort ICE checklist upon entering nomination stage
(#2806)
---
pjnath/src/pjnath/ice_session.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
pjnath/src/pjnath/ice_session.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/pjnath/src/pjnath/ice_session.c b/pjnath/src/pjnath/ice_session.c
index 77d014d62..f2c347163 100644
index 3fecc3def..ef88807a1 100644
--- a/pjnath/src/pjnath/ice_session.c
+++ b/pjnath/src/pjnath/ice_session.c
@@ -4034,8 +4034,12 @@ static void handle_incoming_check(pj_ice_sess *ice,
LOG5((ice->obj_name, "Performing triggered check for check %d",i));
pj_log_push_indent();
- perform_check(ice, &ice->clist, i, nominate);
- pj_log_pop_indent();
@@ -3463,7 +3463,11 @@ static void handle_incoming_check(pj_ice_sess *ice,
LOG4((ice->obj_name, "New triggered check added: %d",
ice->clist.count));
pj_log_push_indent();
+
+ perform_check(ice, &ice->clist, i, nominate);
+ /* Re-sort the list because of the newly added pair. */
+ sort_checklist(ice, &ice->clist);
perform_check(ice, &ice->clist, ice->clist.count++, nominate);
+ /* Re-sort the list because of the newly added pair. */
+ sort_checklist(ice, &ice->clist);
+
+ pj_log_pop_indent();
pj_log_pop_indent();
} else if (c->state == PJ_ICE_SESS_CHECK_STATE_IN_PROGRESS) {
/* Should retransmit immediately
} else {
--
2.25.1
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment