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
55d80fca
Commit
55d80fca
authored
Aug 04, 2008
by
Youness Alaoui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do a proper turn allocate for relayed candidates during the discovery
parent
0ccf0d7c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
7 deletions
+15
-7
agent/discovery.c
agent/discovery.c
+15
-7
No files found.
agent/discovery.c
View file @
55d80fca
...
@@ -586,8 +586,9 @@ static gboolean priv_discovery_tick_unlocked (gpointer pointer)
...
@@ -586,8 +586,9 @@ static gboolean priv_discovery_tick_unlocked (gpointer pointer)
g_debug
(
"Agent %p : discovery - scheduling cand type %u addr %s and socket %d.
\n
"
,
agent
,
g_debug
(
"Agent %p : discovery - scheduling cand type %u addr %s and socket %d.
\n
"
,
agent
,
cand
->
type
,
cand
->
server_addr
,
cand
->
socket
);
cand
->
type
,
cand
->
server_addr
,
cand
->
socket
);
if
(
cand
->
type
==
NICE_CANDIDATE_TYPE_SERVER_REFLEXIVE
&&
if
(
cand
->
server_addr
&&
cand
->
server_addr
)
{
(
cand
->
type
==
NICE_CANDIDATE_TYPE_SERVER_REFLEXIVE
||
cand
->
type
==
NICE_CANDIDATE_TYPE_RELAYED
))
{
NiceAddress
stun_server
;
NiceAddress
stun_server
;
/* XXX FIXME TODO: handle error here?! Kai, help me! */
/* XXX FIXME TODO: handle error here?! Kai, help me! */
...
@@ -600,8 +601,15 @@ static gboolean priv_discovery_tick_unlocked (gpointer pointer)
...
@@ -600,8 +601,15 @@ static gboolean priv_discovery_tick_unlocked (gpointer pointer)
cand
->
component
->
id
,
cand
->
component
->
id
,
NICE_COMPONENT_STATE_GATHERING
);
NICE_COMPONENT_STATE_GATHERING
);
if
(
cand
->
type
==
NICE_CANDIDATE_TYPE_SERVER_REFLEXIVE
)
{
buffer_len
=
stun_usage_bind_create
(
&
agent
->
stun_agent
,
buffer_len
=
stun_usage_bind_create
(
&
agent
->
stun_agent
,
&
cand
->
stun_message
,
cand
->
stun_buffer
,
sizeof
(
cand
->
stun_buffer
));
&
cand
->
stun_message
,
cand
->
stun_buffer
,
sizeof
(
cand
->
stun_buffer
));
}
else
if
(
cand
->
type
==
NICE_CANDIDATE_TYPE_RELAYED
)
{
buffer_len
=
stun_usage_turn_create
(
&
agent
->
stun_agent
,
agent
->
turn_username
,
strlen
(
agent
->
turn_username
),
agent
->
turn_password
,
strlen
(
agent
->
turn_password
),
&
cand
->
stun_message
,
cand
->
stun_buffer
,
sizeof
(
cand
->
stun_buffer
));
}
if
(
buffer_len
>
0
)
{
if
(
buffer_len
>
0
)
{
stun_timer_start
(
&
cand
->
timer
);
stun_timer_start
(
&
cand
->
timer
);
...
...
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