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
79f653f3
Commit
79f653f3
authored
Mar 19, 2009
by
Youness Alaoui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix a race condition crash with retransmission ticks (read comment)
parent
d3147896
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
agent/conncheck.c
agent/conncheck.c
+18
-0
No files found.
agent/conncheck.c
View file @
79f653f3
...
...
@@ -456,6 +456,15 @@ static gboolean priv_conn_keepalive_retransmissions_tick (gpointer pointer)
g_static_rec_mutex_lock
(
&
pair
->
keepalive
.
agent
->
mutex
);
/* A race condition might happen where the mutex above waits for the lock
* and in the meantime another thread destroys the source.
* In that case, we don't need to run our retransmission tick since it should
* have been cancelled */
if
(
pair
->
keepalive
.
tick_source
==
NULL
)
{
g_static_rec_mutex_unlock
(
&
pair
->
keepalive
.
agent
->
mutex
);
return
FALSE
;
}
g_source_destroy
(
pair
->
keepalive
.
tick_source
);
g_source_unref
(
pair
->
keepalive
.
tick_source
);
pair
->
keepalive
.
tick_source
=
NULL
;
...
...
@@ -652,6 +661,15 @@ static gboolean priv_turn_allocate_refresh_retransmissions_tick (gpointer pointe
g_static_rec_mutex_lock
(
&
cand
->
agent
->
mutex
);
/* A race condition might happen where the mutex above waits for the lock
* and in the meantime another thread destroys the source.
* In that case, we don't need to run our retransmission tick since it should
* have been cancelled */
if
(
cand
->
tick_source
==
NULL
)
{
g_static_rec_mutex_unlock
(
&
cand
->
agent
->
mutex
);
return
FALSE
;
}
g_source_destroy
(
cand
->
tick_source
);
g_source_unref
(
cand
->
tick_source
);
cand
->
tick_source
=
NULL
;
...
...
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