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
f8a095da
Commit
f8a095da
authored
Apr 08, 2014
by
Youness Alaoui
Committed by
Olivier Crête
May 15, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix peer reflexive priority depending on transport and compatibility
parent
f93f37f4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
9 deletions
+25
-9
agent/conncheck.c
agent/conncheck.c
+25
-9
No files found.
agent/conncheck.c
View file @
f8a095da
...
...
@@ -576,9 +576,8 @@ static gboolean priv_conn_keepalive_tick_unlocked (NiceAgent *agent)
continue
;
if
(
agent
->
compatibility
==
NICE_COMPATIBILITY_GOOGLE
)
{
guint32
priority
=
nice_candidate_ice_priority_full
(
NICE_CANDIDATE_TYPE_PREF_PEER_REFLEXIVE
,
1
,
p
->
local
->
component_id
);
NiceCandidate
*
candidate_priority
;
guint32
priority
;
uint8_t
uname
[
NICE_STREAM_MAX_UNAME
];
size_t
uname_len
=
priv_create_username
(
agent
,
agent_find_stream
(
agent
,
stream
->
id
),
...
...
@@ -588,6 +587,13 @@ static gboolean priv_conn_keepalive_tick_unlocked (NiceAgent *agent)
size_t
password_len
=
priv_get_password
(
agent
,
agent_find_stream
(
agent
,
stream
->
id
),
p
->
remote
,
&
password
);
candidate_priority
=
nice_candidate_new
(
NICE_CANDIDATE_TYPE_PEER_REFLEXIVE
);
candidate_priority
->
transport
=
p
->
local
->
transport
;
candidate_priority
->
component_id
=
p
->
local
->
component_id
;
priority
=
nice_candidate_jingle_priority
(
candidate_priority
);
nice_candidate_free
(
candidate_priority
);
if
(
nice_debug_is_enabled
())
{
gchar
tmpbuf
[
INET6_ADDRSTRLEN
];
nice_address_to_string
(
&
p
->
remote
->
addr
,
tmpbuf
);
...
...
@@ -1683,12 +1689,8 @@ int conn_check_send (NiceAgent *agent, CandidateCheckPair *pair)
* - ICE-CONTROLLED/ICE-CONTROLLING (for role conflicts)
* - USE-CANDIDATE (if sent by the controlling agent)
*/
guint32
priority
=
nice_candidate_ice_priority_full
(
NICE_CANDIDATE_TYPE_PREF_PEER_REFLEXIVE
,
1
,
pair
->
local
->
component_id
);
NiceCandidate
*
candidate_priority
;
guint32
priority
;
uint8_t
uname
[
NICE_STREAM_MAX_UNAME
];
gsize
uname_len
=
...
...
@@ -1704,6 +1706,20 @@ int conn_check_send (NiceAgent *agent, CandidateCheckPair *pair)
size_t
buffer_len
;
unsigned
int
timeout
;
candidate_priority
=
nice_candidate_new
(
NICE_CANDIDATE_TYPE_PEER_REFLEXIVE
);
candidate_priority
->
transport
=
pair
->
local
->
transport
;
candidate_priority
->
component_id
=
pair
->
local
->
component_id
;
if
(
agent
->
compatibility
==
NICE_COMPATIBILITY_GOOGLE
)
{
priority
=
nice_candidate_jingle_priority
(
candidate_priority
);
}
else
if
(
agent
->
compatibility
==
NICE_COMPATIBILITY_MSN
||
agent
->
compatibility
==
NICE_COMPATIBILITY_OC2007
)
{
priority
=
nice_candidate_msn_priority
(
candidate_priority
);
}
else
{
priority
=
nice_candidate_ice_priority
(
candidate_priority
,
agent
->
reliable
,
FALSE
);
}
nice_candidate_free
(
candidate_priority
);
if
(
password
!=
NULL
&&
(
agent
->
compatibility
==
NICE_COMPATIBILITY_MSN
||
agent
->
compatibility
==
NICE_COMPATIBILITY_OC2007
))
{
...
...
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