mirror of
https://git.jami.net/savoirfairelinux/jami-daemon.git
synced 2025-08-12 22:09:25 +08:00
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
This commit is contained in:

committed by
Adrien Béraud

parent
0552492e01
commit
c33f1ff775
17
contrib/src/pjproject/disable_local_resolution.patch
Normal file
17
contrib/src/pjproject/disable_local_resolution.patch
Normal file
@ -0,0 +1,17 @@
|
||||
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
|
||||
|
16
contrib/src/pjproject/fix_turn_connection_failure.patch
Normal file
16
contrib/src/pjproject/fix_turn_connection_failure.patch
Normal file
@ -0,0 +1,16 @@
|
||||
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)
|
||||
|
||||
|
Reference in New Issue
Block a user