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
291ead7a
Commit
291ead7a
authored
May 17, 2014
by
Olivier Crête
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
discovery: Use nice_address_equal_no_port()
parent
62f12a82
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
12 deletions
+2
-12
agent/discovery.c
agent/discovery.c
+2
-12
No files found.
agent/discovery.c
View file @
291ead7a
...
...
@@ -324,19 +324,14 @@ static void priv_assign_foundation (NiceAgent *agent, NiceCandidate *candidate)
Component
*
component
=
j
->
data
;
for
(
k
=
component
->
local_candidates
;
k
;
k
=
k
->
next
)
{
NiceCandidate
*
n
=
k
->
data
;
NiceAddress
temp
=
n
->
base_addr
;
/* note: candidate must not on the local candidate list */
g_assert
(
candidate
!=
n
);
/* note: ports are not to be compared */
nice_address_set_port
(
&
temp
,
nice_address_get_port
(
&
candidate
->
base_addr
));
if
(
candidate
->
type
==
n
->
type
&&
candidate
->
transport
==
n
->
transport
&&
candidate
->
stream_id
==
n
->
stream_id
&&
nice_address_equal
(
&
candidate
->
base_addr
,
&
temp
)
&&
nice_address_equal
_no_port
(
&
candidate
->
base_addr
,
&
n
->
base_addr
)
&&
!
(
agent
->
compatibility
==
NICE_COMPATIBILITY_GOOGLE
&&
n
->
type
==
NICE_CANDIDATE_TYPE_RELAYED
))
{
/* note: currently only one STUN/TURN server per stream at a
...
...
@@ -379,19 +374,14 @@ static void priv_assign_remote_foundation (NiceAgent *agent, NiceCandidate *cand
for
(
k
=
c
->
remote_candidates
;
k
;
k
=
k
->
next
)
{
NiceCandidate
*
n
=
k
->
data
;
NiceAddress
temp
=
n
->
addr
;
/* note: candidate must not on the remote candidate list */
g_assert
(
candidate
!=
n
);
/* note: ports are not to be compared */
nice_address_set_port
(
&
temp
,
nice_address_get_port
(
&
candidate
->
base_addr
));
if
(
candidate
->
type
==
n
->
type
&&
candidate
->
transport
==
n
->
transport
&&
candidate
->
stream_id
==
n
->
stream_id
&&
nice_address_equal
(
&
candidate
->
addr
,
&
temp
))
{
nice_address_equal
_no_port
(
&
candidate
->
addr
,
&
n
->
addr
))
{
/* note: currently only one STUN/TURN server per stream at a
* time is supported, so there is no need to check
* for candidates that would otherwise share the
...
...
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