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
2ee85311
Commit
2ee85311
authored
Mar 04, 2009
by
Youness Alaoui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clear the retranmission timer and free the keepalive stuff if we ever update the selected pair
parent
15113873
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
4 deletions
+33
-4
agent/component.c
agent/component.c
+21
-1
agent/conncheck.c
agent/conncheck.c
+12
-3
No files found.
agent/component.c
View file @
2ee85311
...
...
@@ -129,7 +129,9 @@ gboolean
component_find_pair
(
Component
*
cmp
,
NiceAgent
*
agent
,
const
gchar
*
lfoundation
,
const
gchar
*
rfoundation
,
CandidatePair
*
pair
)
{
GSList
*
i
;
CandidatePair
result
=
{
NULL
,
NULL
,
0
};
CandidatePair
result
;
memset
(
&
result
,
0
,
sizeof
(
result
));
for
(
i
=
cmp
->
local_candidates
;
i
;
i
=
i
->
next
)
{
NiceCandidate
*
candidate
=
i
->
data
;
...
...
@@ -203,9 +205,20 @@ void component_update_selected_pair (Component *component, const CandidatePair *
g_assert
(
pair
);
nice_debug
(
"setting SELECTED PAIR for component %u: %s:%s (prio:%lu)."
,
component
->
id
,
pair
->
local
->
foundation
,
pair
->
remote
->
foundation
,
(
long
unsigned
)
pair
->
priority
);
if
(
component
->
selected_pair
.
keepalive
.
tick_source
!=
NULL
)
{
g_source_destroy
(
component
->
selected_pair
.
keepalive
.
tick_source
);
g_source_unref
(
component
->
selected_pair
.
keepalive
.
tick_source
);
component
->
selected_pair
.
keepalive
.
tick_source
=
NULL
;
}
memset
(
&
component
->
selected_pair
,
0
,
sizeof
(
CandidatePair
));
component
->
selected_pair
.
local
=
pair
->
local
;
component
->
selected_pair
.
remote
=
pair
->
remote
;
component
->
selected_pair
.
priority
=
pair
->
priority
;
}
/*
...
...
@@ -287,6 +300,13 @@ component_set_selected_remote_candidate (NiceAgent *agent, Component *component,
}
}
if
(
component
->
selected_pair
.
keepalive
.
tick_source
!=
NULL
)
{
g_source_destroy
(
component
->
selected_pair
.
keepalive
.
tick_source
);
g_source_unref
(
component
->
selected_pair
.
keepalive
.
tick_source
);
component
->
selected_pair
.
keepalive
.
tick_source
=
NULL
;
}
memset
(
&
component
->
selected_pair
,
0
,
sizeof
(
CandidatePair
));
component
->
selected_pair
.
local
=
local
;
component
->
selected_pair
.
remote
=
remote
;
component
->
selected_pair
.
priority
=
priority
;
...
...
agent/conncheck.c
View file @
2ee85311
...
...
@@ -919,8 +919,17 @@ static gboolean priv_update_selected_pair (NiceAgent *agent, Component *componen
g_assert
(
component
);
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
);
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
);
if
(
component
->
selected_pair
.
keepalive
.
tick_source
!=
NULL
)
{
g_source_destroy
(
component
->
selected_pair
.
keepalive
.
tick_source
);
g_source_unref
(
component
->
selected_pair
.
keepalive
.
tick_source
);
component
->
selected_pair
.
keepalive
.
tick_source
=
NULL
;
}
memset
(
&
component
->
selected_pair
,
0
,
sizeof
(
CandidatePair
));
component
->
selected_pair
.
local
=
pair
->
local
;
component
->
selected_pair
.
remote
=
pair
->
remote
;
component
->
selected_pair
.
priority
=
pair
->
priority
;
...
...
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