Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
libnice
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
libnice
Commits
4b704525
Commit
4b704525
authored
May 03, 2020
by
Fabrice Bellet
Committed by
Olivier Crête
May 08, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
conncheck: send udp turn refreshes in oc2007r2 compatibility mode too
parent
74f28bda
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
agent/conncheck.c
agent/conncheck.c
+8
-7
No files found.
agent/conncheck.c
View file @
4b704525
...
@@ -3788,12 +3788,15 @@ priv_calc_turn_timeout (guint lifetime)
...
@@ -3788,12 +3788,15 @@ priv_calc_turn_timeout (guint lifetime)
return
lifetime
/
2
;
return
lifetime
/
2
;
}
}
static
CandidateRefresh
*
static
void
priv_add_new_turn_refresh
(
NiceAgent
*
agent
,
CandidateDiscovery
*
cdisco
,
priv_add_new_turn_refresh
(
NiceAgent
*
agent
,
CandidateDiscovery
*
cdisco
,
NiceCandidate
*
relay_cand
,
guint
lifetime
)
NiceCandidate
*
relay_cand
,
guint
lifetime
)
{
{
CandidateRefresh
*
cand
;
CandidateRefresh
*
cand
;
if
(
cdisco
->
turn
->
type
!=
NICE_RELAY_TYPE_TURN_UDP
)
return
;
cand
=
g_slice_new0
(
CandidateRefresh
);
cand
=
g_slice_new0
(
CandidateRefresh
);
agent
->
refresh_list
=
g_slist_append
(
agent
->
refresh_list
,
cand
);
agent
->
refresh_list
=
g_slist_append
(
agent
->
refresh_list
,
cand
);
...
@@ -3810,7 +3813,7 @@ priv_add_new_turn_refresh (NiceAgent *agent, CandidateDiscovery *cdisco,
...
@@ -3810,7 +3813,7 @@ priv_add_new_turn_refresh (NiceAgent *agent, CandidateDiscovery *cdisco,
sizeof
(
cand
->
stun_resp_buffer
));
sizeof
(
cand
->
stun_resp_buffer
));
memcpy
(
&
cand
->
stun_resp_msg
,
&
cdisco
->
stun_resp_msg
,
sizeof
(
StunMessage
));
memcpy
(
&
cand
->
stun_resp_msg
,
&
cdisco
->
stun_resp_msg
,
sizeof
(
StunMessage
));
cand
->
stun_resp_msg
.
buffer
=
cand
->
stun_resp_buffer
;
cand
->
stun_resp_msg
.
buffer
=
cand
->
stun_resp_buffer
;
cand
->
stun_resp_msg
.
agent
=
NULL
;
cand
->
stun_resp_msg
.
agent
=
&
cand
->
stun_agent
;
cand
->
stun_resp_msg
.
key
=
NULL
;
cand
->
stun_resp_msg
.
key
=
NULL
;
}
}
...
@@ -3825,7 +3828,7 @@ priv_add_new_turn_refresh (NiceAgent *agent, CandidateDiscovery *cdisco,
...
@@ -3825,7 +3828,7 @@ priv_add_new_turn_refresh (NiceAgent *agent, CandidateDiscovery *cdisco,
nice_debug
(
"timer source is : %p"
,
cand
->
timer_source
);
nice_debug
(
"timer source is : %p"
,
cand
->
timer_source
);
return
cand
;
return
;
}
}
static
void
priv_handle_turn_alternate_server
(
NiceAgent
*
agent
,
static
void
priv_handle_turn_alternate_server
(
NiceAgent
*
agent
,
...
@@ -3984,9 +3987,8 @@ static gboolean priv_map_reply_to_relay_request (NiceAgent *agent, StunMessage *
...
@@ -3984,9 +3987,8 @@ static gboolean priv_map_reply_to_relay_request (NiceAgent *agent, StunMessage *
&
d
->
stun_message
);
&
d
->
stun_message
);
nice_udp_turn_socket_set_ms_connection_id
(
relay_cand
->
sockptr
,
nice_udp_turn_socket_set_ms_connection_id
(
relay_cand
->
sockptr
,
resp
);
resp
);
}
else
{
priv_add_new_turn_refresh
(
agent
,
d
,
relay_cand
,
lifetime
);
}
}
priv_add_new_turn_refresh
(
agent
,
d
,
relay_cand
,
lifetime
);
}
}
relay_cand
=
discovery_add_relay_candidate
(
relay_cand
=
discovery_add_relay_candidate
(
...
@@ -4024,9 +4026,8 @@ static gboolean priv_map_reply_to_relay_request (NiceAgent *agent, StunMessage *
...
@@ -4024,9 +4026,8 @@ static gboolean priv_map_reply_to_relay_request (NiceAgent *agent, StunMessage *
&
d
->
stun_message
);
&
d
->
stun_message
);
nice_udp_turn_socket_set_ms_connection_id
(
relay_cand
->
sockptr
,
nice_udp_turn_socket_set_ms_connection_id
(
relay_cand
->
sockptr
,
resp
);
resp
);
}
else
{
priv_add_new_turn_refresh
(
agent
,
d
,
relay_cand
,
lifetime
);
}
}
priv_add_new_turn_refresh
(
agent
,
d
,
relay_cand
,
lifetime
);
/* In case a new candidate has been added */
/* In case a new candidate has been added */
conn_check_schedule_next
(
agent
);
conn_check_schedule_next
(
agent
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment