Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
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
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
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
Mathieu Duponchelle
libnice
Commits
3d4cdee1
Commit
3d4cdee1
authored
Nov 16, 2018
by
Olivier Crête
👻
Committed by
Olivier Crête
Dec 27, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
agent: Check for early checks on dribbled candidates too
We have to check this list every time candidates are added.
parent
f97f1072
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
48 additions
and
38 deletions
+48
-38
agent/agent.c
agent/agent.c
+1
-0
agent/conncheck.c
agent/conncheck.c
+46
-38
agent/conncheck.h
agent/conncheck.h
+1
-0
No files found.
agent/agent.c
View file @
3d4cdee1
...
...
@@ -3616,6 +3616,7 @@ _set_remote_candidates_locked (NiceAgent *agent, NiceStream *stream,
}
if
(
added
>
0
)
{
conn_check_remote_candidates_set
(
agent
,
stream
,
component
);
conn_check_schedule_next
(
agent
);
}
...
...
agent/conncheck.c
View file @
3d4cdee1
...
...
@@ -1630,56 +1630,64 @@ gint conn_check_compare (const CandidateCheckPair *a, const CandidateCheckPair *
return
0
;
}
void
conn_check_remote_candidates_set
(
NiceAgent
*
agent
,
NiceStream
*
stream
,
NiceComponent
*
component
)
{
GSList
*
l
,
*
m
;
GList
*
k
;
for
(
k
=
component
->
incoming_checks
.
head
;
k
;)
{
IncomingCheck
*
icheck
=
k
->
data
;
GList
*
k_next
=
k
->
next
;
/* sect 7.2.1.3., "Learning Peer Reflexive Candidates", has to
* be handled separately */
for
(
l
=
component
->
remote_candidates
;
l
;
l
=
l
->
next
)
{
NiceCandidate
*
rcand
=
l
->
data
;
NiceCandidate
*
lcand
=
NULL
;
if
(
nice_address_equal
(
&
rcand
->
addr
,
&
icheck
->
from
))
{
for
(
m
=
component
->
local_candidates
;
m
;
m
=
m
->
next
)
{
NiceCandidate
*
cand
=
m
->
data
;
if
(
nice_address_equal
(
&
cand
->
addr
,
&
icheck
->
local_socket
->
addr
))
{
lcand
=
cand
;
break
;
}
}
g_assert
(
lcand
!=
NULL
);
priv_schedule_triggered_check
(
agent
,
stream
,
component
,
icheck
->
local_socket
,
rcand
);
if
(
icheck
->
use_candidate
)
priv_mark_pair_nominated
(
agent
,
stream
,
component
,
lcand
,
rcand
);
g_queue_delete_link
(
&
component
->
incoming_checks
,
k
);
break
;
}
}
k
=
k_next
;
}
}
/*
* Handle any processing steps for connectivity checks after
* remote credentials have been set. This function handles
* the special case where answerer has sent us connectivity
* checks before the answer (containing credentials information),
* reaches us. The special case is documented in
sect 7.2
*
if ICE spec (ID-19
).
* reaches us. The special case is documented in
RFC 5245 sect 7.2.
* ).
*/
void
conn_check_remote_credentials_set
(
NiceAgent
*
agent
,
NiceStream
*
stream
)
{
GSList
*
j
,
*
l
,
*
m
;
GList
*
k
;
IncomingCheck
*
c
;
GSList
*
j
;
for
(
j
=
stream
->
components
;
j
;
j
=
j
->
next
)
{
NiceComponent
*
component
=
j
->
data
;
for
(
k
=
component
->
incoming_checks
.
head
;
k
;)
{
IncomingCheck
*
icheck
=
k
->
data
;
GList
*
k_next
=
k
->
next
;
/* sect 7.2.1.3., "Learning Peer Reflexive Candidates", has to
* be handled separately */
for
(
l
=
component
->
remote_candidates
;
l
;
l
=
l
->
next
)
{
NiceCandidate
*
rcand
=
l
->
data
;
NiceCandidate
*
lcand
=
NULL
;
if
(
nice_address_equal
(
&
rcand
->
addr
,
&
icheck
->
from
))
{
for
(
m
=
component
->
local_candidates
;
m
;
m
=
m
->
next
)
{
NiceCandidate
*
cand
=
m
->
data
;
if
(
nice_address_equal
(
&
cand
->
addr
,
&
icheck
->
local_socket
->
addr
))
{
lcand
=
cand
;
break
;
}
}
g_assert
(
lcand
!=
NULL
);
priv_schedule_triggered_check
(
agent
,
stream
,
component
,
icheck
->
local_socket
,
rcand
);
if
(
icheck
->
use_candidate
)
priv_mark_pair_nominated
(
agent
,
stream
,
component
,
lcand
,
rcand
);
g_queue_delete_link
(
&
component
->
incoming_checks
,
k
);
break
;
}
}
k
=
k_next
;
}
conn_check_remote_candidates_set
(
agent
,
stream
,
component
);
}
}
...
...
agent/conncheck.h
View file @
3d4cdee1
...
...
@@ -111,6 +111,7 @@ int conn_check_send (NiceAgent *agent, CandidateCheckPair *pair);
void
conn_check_prune_stream
(
NiceAgent
*
agent
,
NiceStream
*
stream
);
gboolean
conn_check_handle_inbound_stun
(
NiceAgent
*
agent
,
NiceStream
*
stream
,
NiceComponent
*
component
,
NiceSocket
*
udp_socket
,
const
NiceAddress
*
from
,
gchar
*
buf
,
guint
len
);
gint
conn_check_compare
(
const
CandidateCheckPair
*
a
,
const
CandidateCheckPair
*
b
);
void
conn_check_remote_candidates_set
(
NiceAgent
*
agent
,
NiceStream
*
stream
,
NiceComponent
*
component
);
void
conn_check_remote_credentials_set
(
NiceAgent
*
agent
,
NiceStream
*
stream
);
NiceCandidateTransport
conn_check_match_transport
(
NiceCandidateTransport
transport
);
void
...
...
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