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
729bd3bb
Commit
729bd3bb
authored
Feb 08, 2016
by
Olivier Crête
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
conncheck: Deduplicate conncheck stopping code
parent
f122e417
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
16 deletions
+12
-16
agent/conncheck.c
agent/conncheck.c
+12
-16
No files found.
agent/conncheck.c
View file @
729bd3bb
...
...
@@ -434,6 +434,17 @@ static gboolean priv_conn_check_tick_stream (NiceStream *stream, NiceAgent *agen
}
static
void
conn_check_stop
(
NiceAgent
*
agent
)
{
if
(
agent
->
conncheck_timer_source
==
NULL
)
return
;
g_source_destroy
(
agent
->
conncheck_timer_source
);
g_source_unref
(
agent
->
conncheck_timer_source
);
agent
->
conncheck_timer_source
=
NULL
;
}
/*
* Timer callback that handles initiating and managing connectivity
...
...
@@ -524,11 +535,7 @@ static gboolean priv_conn_check_tick_unlocked (NiceAgent *agent)
/* Stopping the timer so destroy the source.. this will allow
the timer to be reset if we get a set_remote_candidates after this
point */
if
(
agent
->
conncheck_timer_source
!=
NULL
)
{
g_source_destroy
(
agent
->
conncheck_timer_source
);
g_source_unref
(
agent
->
conncheck_timer_source
);
agent
->
conncheck_timer_source
=
NULL
;
}
conn_check_stop
(
agent
);
/* XXX: what to signal, is all processing now really done? */
nice_debug
(
"Agent %p : changing conncheck state to COMPLETED."
,
agent
);
...
...
@@ -1632,17 +1639,6 @@ static void conn_check_free_item (gpointer data)
g_slice_free
(
CandidateCheckPair
,
pair
);
}
static
void
conn_check_stop
(
NiceAgent
*
agent
)
{
if
(
agent
->
conncheck_timer_source
==
NULL
)
return
;
g_source_destroy
(
agent
->
conncheck_timer_source
);
g_source_unref
(
agent
->
conncheck_timer_source
);
agent
->
conncheck_timer_source
=
NULL
;
}
/*
* Frees all resources of all connectivity checks.
*/
...
...
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