Skip to content
Snippets Groups Projects
Unverified Commit d10e7a1e authored by Sébastien Blin's avatar Sébastien Blin
Browse files

pjproject: avoid to fail the negotiation when TURN needs a retry

This aims to fix the some negotiation failure when:
UserA (TURN ipv4) calls UserB (ipv4 only)

In fact, the first user will take some time to know the userB
addresses to allow on the TURN. So, during this time, the TURN will
give some EPIPE errors. EPIPE is code 32 defined by 120032 in pjsip
(PJ_STATUS_FROM_OS(EPIPE)).

So previous code was a mistake

Change-Id: If38c5d36dc38bfe89e3b2ccfbf1b64c934639adb
parent fe198fbe
Branches
No related tags found
No related merge requests found
......@@ -18,7 +18,6 @@ on behalf of Savoir-faire Linux.
Rebased for pjsip 2.10 by Peymane Marandi
<paymon@savoirfairelinux.com>
on behalf of Savoir-faire Linux.
---
pjnath/include/pjnath/ice_session.h | 173 +++-
pjnath/include/pjnath/ice_strans.h | 21 +
......@@ -670,7 +669,7 @@ index fff4fad26..e7f8b84eb 100644
if (status != PJ_SUCCESS && status != PJ_EPENDING) {
app_perror(" error: server sending data", status);
diff --git a/pjnath/src/pjnath/ice_session.c b/pjnath/src/pjnath/ice_session.c
index 2a4125bc5..d2eae9494 100644
index 2a4125bc5..85d3234c9 100644
--- a/pjnath/src/pjnath/ice_session.c
+++ b/pjnath/src/pjnath/ice_session.c
@@ -18,6 +18,7 @@
......@@ -1247,7 +1246,7 @@ index 2a4125bc5..d2eae9494 100644
+ status_send_msg);
+ return;
+ }
+ if (status_send_msg == 120033 /* BROKEN PIPE */) {
+ if (status_send_msg == 120032 /* BROKEN PIPE */) {
+ check->state = PJ_ICE_SESS_CHECK_STATE_NEEDS_RETRY;
+ check_set_state(ice, check, PJ_ICE_SESS_CHECK_STATE_NEEDS_RETRY,
+ status_send_msg);
......@@ -4158,5 +4157,4 @@ index 474a8d07c..9257f07a4 100644
if (status != PJ_SUCCESS) {
char errmsg[PJ_ERR_MSG_SIZE];
--
2.25.2
2.25.2
\ No newline at end of file
......@@ -516,7 +516,7 @@ IceTransport::Impl::onComplete(pj_ice_strans* ice_st, pj_ice_strans_op op, pj_st
}
else {
last_errmsg_ = sip_utils::sip_strerror(status);
JAMI_ERR("[ice:%p] %s failed: %s", this, opname, last_errmsg_.c_str());
JAMI_ERR("[ice:%p] %s %s failed: %s", this, (config_.protocol == PJ_ICE_TP_TCP? "TCP" : "UDP"), opname, last_errmsg_.c_str());
}
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment