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
153bbf6b
Commit
153bbf6b
authored
Jan 23, 2014
by
Olivier Crête
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
outputstream: Release blocking send lock while sending
Otherwise it produces a deadlock
parent
3da6767e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
agent/outputstream.c
agent/outputstream.c
+7
-0
No files found.
agent/outputstream.c
View file @
153bbf6b
...
@@ -399,9 +399,16 @@ nice_output_stream_write (GOutputStream *stream, const void *buffer, gsize count
...
@@ -399,9 +399,16 @@ nice_output_stream_write (GOutputStream *stream, const void *buffer, gsize count
do
{
do
{
/* Have to unlock while calling into the agent because
* it will take the agent lock which will cause a deadlock if one of
* the callbacks is called.
*/
g_mutex_unlock
(
&
write_data
->
mutex
);
_len
=
nice_agent_send_full
(
agent
,
self
->
priv
->
stream_id
,
_len
=
nice_agent_send_full
(
agent
,
self
->
priv
->
stream_id
,
self
->
priv
->
component_id
,
(
guint8
*
)
buffer
+
len
,
count
-
len
,
self
->
priv
->
component_id
,
(
guint8
*
)
buffer
+
len
,
count
-
len
,
cancellable
,
&
child_error
);
cancellable
,
&
child_error
);
g_mutex_lock
(
&
write_data
->
mutex
);
if
(
_len
==
-
1
&&
if
(
_len
==
-
1
&&
g_error_matches
(
child_error
,
G_IO_ERROR
,
G_IO_ERROR_WOULD_BLOCK
))
{
g_error_matches
(
child_error
,
G_IO_ERROR
,
G_IO_ERROR_WOULD_BLOCK
))
{
...
...
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