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
801fac1f
Commit
801fac1f
authored
Aug 20, 2009
by
Youness Alaoui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correctly show the priority as a guint64
parent
4dc7fab1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
9 deletions
+18
-9
agent/agent.c
agent/agent.c
+10
-3
agent/conncheck.c
agent/conncheck.c
+8
-6
No files found.
agent/agent.c
View file @
801fac1f
...
...
@@ -1557,7 +1557,14 @@ static gboolean priv_add_remote_candidate (
/* step: check whether the candidate already exists */
candidate
=
component_find_remote_candidate
(
component
,
addr
,
transport
);
if
(
candidate
)
{
nice_debug
(
"Agent %p : Update existing remote candidate %p."
,
agent
,
candidate
);
{
gchar
tmpbuf
[
INET6_ADDRSTRLEN
];
nice_address_to_string
(
addr
,
tmpbuf
);
nice_debug
(
"Agent %p : Updating existing remote candidate with addr [%s]:%u"
" for s%d/c%d. U/P '%s'/'%s' prio: %u"
,
agent
,
tmpbuf
,
nice_address_get_port
(
addr
),
stream_id
,
component_id
,
username
,
password
,
priority
);
}
/* case 1: an existing candidate, update the attributes */
candidate
->
type
=
type
;
if
(
base_addr
)
...
...
@@ -1605,9 +1612,9 @@ static gboolean priv_add_remote_candidate (
gchar
tmpbuf
[
INET6_ADDRSTRLEN
];
nice_address_to_string
(
addr
,
tmpbuf
);
nice_debug
(
"Agent %p : Adding remote candidate with addr [%s]:%u"
" for s%d/c%d. U/P '%s'/'%s'"
,
agent
,
tmpbuf
,
" for s%d/c%d. U/P '%s'/'%s'
prio: %u
"
,
agent
,
tmpbuf
,
nice_address_get_port
(
addr
),
stream_id
,
component_id
,
username
,
password
);
username
,
password
,
priority
);
}
if
(
base_addr
)
...
...
agent/conncheck.c
View file @
801fac1f
...
...
@@ -1100,8 +1100,8 @@ static gboolean priv_update_selected_pair (NiceAgent *agent, Component *componen
g_assert
(
pair
);
if
(
pair
->
priority
>
component
->
selected_pair
.
priority
)
{
nice_debug
(
"Agent %p : changing SELECTED PAIR for component %u: %s:%s "
"(prio:%
lu
)."
,
agent
,
component
->
id
,
pair
->
local
->
foundation
,
pair
->
remote
->
foundation
,
(
long
unsigned
)
pair
->
priority
);
"(prio:%
"
G_GUINT64_FORMAT
"
)."
,
agent
,
component
->
id
,
pair
->
local
->
foundation
,
pair
->
remote
->
foundation
,
pair
->
priority
);
if
(
component
->
selected_pair
.
keepalive
.
tick_source
!=
NULL
)
{
g_source_destroy
(
component
->
selected_pair
.
keepalive
.
tick_source
);
...
...
@@ -1701,6 +1701,8 @@ static guint priv_prune_pending_checks (Stream *stream, guint component_id)
guint64
highest_nominated_priority
=
0
;
guint
in_progress
=
0
;
nice_debug
(
"Finding highest priority for component %d"
,
component_id
);
for
(
i
=
stream
->
conncheck_list
;
i
;
i
=
i
->
next
)
{
CandidateCheckPair
*
p
=
i
->
data
;
if
(
p
->
component_id
==
component_id
&&
...
...
@@ -1714,7 +1716,7 @@ static guint priv_prune_pending_checks (Stream *stream, guint component_id)
}
nice_debug
(
"Agent XXX: Pruning pending checks. Highest nominated priority "
"is %
lu"
,
highest_nominated_priority
);
"is %
"
G_GUINT64_FORMAT
,
highest_nominated_priority
);
/* step: cancel all FROZEN and WAITING pairs for the component */
for
(
i
=
stream
->
conncheck_list
;
i
;
i
=
i
->
next
)
{
...
...
@@ -1737,9 +1739,9 @@ static guint priv_prune_pending_checks (Stream *stream, guint component_id)
}
else
{
/* We must keep the higher priority pairs running because if a udp
* packet was lost, we might end up using a bad candidate */
nice_debug
(
"Agent XXX : pair %p kept IN_PROGRESS because priority %
d
"
" is higher than currently nominated pair %d"
,
p
,
p
->
priority
,
highest_nominated_priority
);
nice_debug
(
"Agent XXX : pair %p kept IN_PROGRESS because priority %"
G_GUINT64_FORMAT
" is higher than currently nominated pair %"
G_GUINT64_FORMAT
,
p
,
p
->
priority
,
highest_nominated_priority
);
in_progress
++
;
}
}
...
...
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