Skip to content
Snippets Groups Projects
Commit c33f1ff7 authored by Sébastien Blin's avatar Sébastien Blin Committed by Adrien Béraud
Browse files

lan: improve pjsip behavior in a LAN

1. Resolving the TURN server but receiving connection timeout are
breaking the ICE init for now. This should not be the case. This
patch only removes the candidate from the candidate's list if a
conection timeout to the TURN occurs.
2. pj_getaddrinfo is very slow. Moreover, it's unecessary because
we succeed to get correct hosts candidates. So, just disable this.

Change-Id: Ic17628032c66ab1eeab43036bc340c81808aea5c
parent 0552492e
No related branches found
No related tags found
No related merge requests found
pjlib/include/pj/config.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/pjlib/include/pj/config.h b/pjlib/include/pj/config.h
index ad0abbb5..6bba5a55 100644
--- a/pjlib/include/pj/config.h
+++ b/pjlib/include/pj/config.h
@@ -1003,6 +1003,9 @@
#endif
+#ifndef PJ_GETHOSTIP_DISABLE_LOCAL_RESOLUTION
+# define PJ_GETHOSTIP_DISABLE_LOCAL_RESOLUTION 1
+#endif
/** @} */
......@@ -39,6 +39,8 @@ bash -c "%PATCH_CMD% %UNIXPATH%pjproject/ice_config.patch"
bash -c "%PATCH_CMD% %UNIXPATH%pjproject/fix_first_packet_turn_tcp.patch"
bash -c "%PATCH_CMD% %UNIXPATH%pjproject/fix_ebusy_turn.patch"
bash -c "%PATCH_CMD% %UNIXPATH%pjproject/ignore_ipv6_on_transport_check.patch"
bash -c "%PATCH_CMD% %UNIXPATH%pjproject/fix_turn_connection_failure.patch"
bash -c "%PATCH_CMD% %UNIXPATH%pjproject/disable_local_resolution.patch"
%APPLY_CMD% %SRC%\pjproject\win32_vs_gnutls.patch
%APPLY_CMD% %SRC%\pjproject\win_config.patch
......
pjnath/src/pjnath/ice_strans.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pjnath/src/pjnath/ice_strans.c b/pjnath/src/pjnath/ice_strans.c
index 72f12700..d4790049 100644
--- a/pjnath/src/pjnath/ice_strans.c
+++ b/pjnath/src/pjnath/ice_strans.c
@@ -2854,7 +2854,7 @@ static void turn_on_state(pj_turn_sock *turn_sock, pj_turn_state_t old_state,
sess_init_update(comp->ice_st);
- } else if ((old_state == PJ_TURN_STATE_RESOLVING || old_state == PJ_TURN_STATE_ALLOCATING) &&
+ } else if (old_state >= PJ_TURN_STATE_RESOLVING && old_state <= PJ_TURN_STATE_ALLOCATING &&
new_state >= PJ_TURN_STATE_DEALLOCATING)
{
pj_ice_sess_cand *cand = NULL;
......@@ -68,6 +68,8 @@ endif
$(APPLY) $(SRC)/pjproject/fix_first_packet_turn_tcp.patch
$(APPLY) $(SRC)/pjproject/fix_ebusy_turn.patch
$(APPLY) $(SRC)/pjproject/ignore_ipv6_on_transport_check.patch
$(APPLY) $(SRC)/pjproject/fix_turn_connection_failure.patch
$(APPLY) $(SRC)/pjproject/disable_local_resolution.patch
$(UPDATE_AUTOCONFIG)
$(MOVE)
......
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