Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-daemon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-daemon
Commits
ff5ed9d3
Unverified
Commit
ff5ed9d3
authored
5 years ago
by
Sébastien Blin
Browse files
Options
Downloads
Patches
Plain Diff
filetransfer: fix add_header detection before the first on_return
Change-Id: I59414f3d0c55f13aa8a91e498ee8c694fa73ffe3
parent
33059729
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
contrib/src/pjproject/0001-rfc6544.patch
+278
-270
278 additions, 270 deletions
contrib/src/pjproject/0001-rfc6544.patch
with
278 additions
and
270 deletions
contrib/src/pjproject/0001-rfc6544.patch
+
278
−
270
View file @
ff5ed9d3
...
@@ -28,7 +28,7 @@ on behalf of Savoir-faire Linux.
...
@@ -28,7 +28,7 @@ on behalf of Savoir-faire Linux.
pjnath/src/pjnath-test/sess_auth.c | 14 +-
pjnath/src/pjnath-test/sess_auth.c | 14 +-
pjnath/src/pjnath-test/stun_sock_test.c | 7 +-
pjnath/src/pjnath-test/stun_sock_test.c | 7 +-
pjnath/src/pjnath/ice_session.c | 515 ++++++++++-
pjnath/src/pjnath/ice_session.c | 515 ++++++++++-
pjnath/src/pjnath/ice_strans.c | 77
1
+++++++++++++---
pjnath/src/pjnath/ice_strans.c | 77
3
+++++++++++++---
pjnath/src/pjnath/nat_detect.c | 7 +-
pjnath/src/pjnath/nat_detect.c | 7 +-
pjnath/src/pjnath/stun_session.c | 15 +-
pjnath/src/pjnath/stun_session.c | 15 +-
pjnath/src/pjnath/stun_sock.c | 1075 +++++++++++++++++++----
pjnath/src/pjnath/stun_sock.c | 1075 +++++++++++++++++++----
...
@@ -40,7 +40,7 @@ on behalf of Savoir-faire Linux.
...
@@ -40,7 +40,7 @@ on behalf of Savoir-faire Linux.
pjnath/src/pjturn-srv/server.c | 2 +-
pjnath/src/pjturn-srv/server.c | 2 +-
pjsip-apps/src/samples/icedemo.c | 116 ++-
pjsip-apps/src/samples/icedemo.c | 116 ++-
pjsip/src/pjsua-lib/pjsua_core.c | 2 +-
pjsip/src/pjsua-lib/pjsua_core.c | 2 +-
21 files changed, 250
9
insertions(+), 40
2
deletions(-)
21 files changed, 25
1
0 insertions(+), 40
3
deletions(-)
diff --git a/pjnath/include/pjnath/ice_session.h b/pjnath/include/pjnath/ice_session.h
diff --git a/pjnath/include/pjnath/ice_session.h b/pjnath/include/pjnath/ice_session.h
index 8971220f0..39c197c29 100644
index 8971220f0..39c197c29 100644
...
@@ -1387,7 +1387,7 @@ index 2a4125bc5..85d3234c9 100644
...
@@ -1387,7 +1387,7 @@ index 2a4125bc5..85d3234c9 100644
}
}
}
}
diff --git a/pjnath/src/pjnath/ice_strans.c b/pjnath/src/pjnath/ice_strans.c
diff --git a/pjnath/src/pjnath/ice_strans.c b/pjnath/src/pjnath/ice_strans.c
index 3cb350c2a..
69df9f40a
100644
index 3cb350c2a..
bf7f98096
100644
--- a/pjnath/src/pjnath/ice_strans.c
--- a/pjnath/src/pjnath/ice_strans.c
+++ b/pjnath/src/pjnath/ice_strans.c
+++ b/pjnath/src/pjnath/ice_strans.c
@@ -69,6 +69,7 @@
enum tp_type
@@ -69,6 +69,7 @@
enum tp_type
...
@@ -1465,7 +1465,7 @@ index 3cb350c2a..69df9f40a 100644
...
@@ -1465,7 +1465,7 @@ index 3cb350c2a..69df9f40a 100644
+ pj_uint16_t rx_buffer_size;
+ pj_uint16_t rx_buffer_size;
+ pj_uint16_t rx_wanted_size;
+ pj_uint16_t rx_wanted_size;
+
+
+
unsigned
last_data_len; /**< What the application is waiting. */
+
pj_ssize_t
last_data_len; /**< What the application is waiting. */
};
};
...
@@ -1907,7 +1907,17 @@ index 3cb350c2a..69df9f40a 100644
...
@@ -1907,7 +1907,17 @@ index 3cb350c2a..69df9f40a 100644
ice_st->is_pending = PJ_TRUE;
ice_st->is_pending = PJ_TRUE;
ice_st->buf_idx = idx;
ice_st->buf_idx = idx;
@@ -1659,16 +1772,40 @@
static pj_status_t send_data(pj_ice_strans *ice_st,
@@ -1651,6 +1764,9 @@
static pj_status_t send_data(pj_ice_strans *ice_st,
}
}
+ def_cand = &comp->cand_list[comp->default_cand];
+ pj_bool_t add_header = def_cand->transport != PJ_CAND_UDP;
+
/* If ICE is available, send data with ICE, otherwise send with the
* default candidate selected during initialization.
*
@@ -1659,16 +1775,37 @@
static pj_status_t send_data(pj_ice_strans *ice_st,
*/
*/
if (ice_st->ice && ice_st->state == PJ_ICE_STRANS_STATE_RUNNING) {
if (ice_st->ice && ice_st->state == PJ_ICE_STRANS_STATE_RUNNING) {
status = pj_ice_sess_send_data(ice_st->ice, comp_id, buf, data_len);
status = pj_ice_sess_send_data(ice_st->ice, comp_id, buf, data_len);
...
@@ -1922,10 +1932,8 @@ index 3cb350c2a..69df9f40a 100644
...
@@ -1922,10 +1932,8 @@ index 3cb350c2a..69df9f40a 100644
pj_grp_lock_release(ice_st->grp_lock);
pj_grp_lock_release(ice_st->grp_lock);
def_cand = &comp->cand_list[comp->default_cand];
-
def_cand = &comp->cand_list[comp->default_cand];
-
-
+
+ pj_bool_t add_header = def_cand->transport != PJ_CAND_UDP;
+ /* TCP, add header */
+ /* TCP, add header */
+ if (add_header) {
+ if (add_header) {
+ /*
+ /*
...
@@ -4157,4 +4165,4 @@ index 474a8d07c..9257f07a4 100644
...
@@ -4157,4 +4165,4 @@ index 474a8d07c..9257f07a4 100644
if (status != PJ_SUCCESS) {
if (status != PJ_SUCCESS) {
char errmsg[PJ_ERR_MSG_SIZE];
char errmsg[PJ_ERR_MSG_SIZE];
--
--
2.25.2
2.26.2
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment