Skip to content
Snippets Groups Projects
Commit b954f3b5 authored by Mohamed Chibani's avatar Mohamed Chibani Committed by Sébastien Blin
Browse files

ice: resort the check list when adding prflx candidates

Resort the check list  when new prflx candidates are discovered,
to avoid the nomination of candidates pairs with less priority.

Gitlab: #617

Change-Id: I93559facd8b6ce99708ccf1311925837d9cd119d
parent 172834b2
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
---
pjnath/src/pjnath/ice_session.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/pjnath/src/pjnath/ice_session.c b/pjnath/src/pjnath/ice_session.c
index 77d014d62..f2c347163 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();
+
+ perform_check(ice, &ice->clist, i, nominate);
+ /* Re-sort the list because of the newly added pair. */
+ sort_checklist(ice, &ice->clist);
+
+ pj_log_pop_indent();
} else if (c->state == PJ_ICE_SESS_CHECK_STATE_IN_PROGRESS) {
/* Should retransmit immediately
--
2.25.1
......@@ -21,6 +21,7 @@
"0015-fix-socktype-and-duplicate-checking.patch",
"0017-auto-register-thread.patch",
"0018-fix-ioqueue-lock-acquire.patch",
"0019-resort-check-list-after-adding-prflx.patch",
"0001-win-config.patch",
"0002-win-vs-gnutls.patch",
"0003-win-vs2017-props.patch"
......
......@@ -63,6 +63,7 @@ pjproject: pjproject-$(PJPROJECT_VERSION).tar.gz .sum-pjproject
$(APPLY) $(SRC)/pjproject/0015-fix-socktype-and-duplicate-checking.patch # TODO remove with 2.12 (https://github.com/pjsip/pjproject/commits/2feee8db77ed47e7b574367295d4f03f9aea67f8)
$(APPLY) $(SRC)/pjproject/0017-auto-register-thread.patch
$(APPLY) $(SRC)/pjproject/0018-fix-ioqueue-lock-acquire.patch
$(APPLY) $(SRC)/pjproject/0019-resort-check-list-after-adding-prflx.patch
ifdef HAVE_ANDROID
$(APPLY) $(SRC)/pjproject/0001-android.patch
endif
......
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