mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 23:16:14 +01:00
gdbus: make sure to stay locked when sending message
This patch fixes a case where schedule_writing_unlocked() was called
without holding the write lock. The bug was introduced in commit
512e9b3b
.
https://bugzilla.gnome.org/show_bug.cgi?id=778002
This commit is contained in:
parent
cb26c677e6
commit
c457ec053d
@ -1571,10 +1571,10 @@ schedule_writing_unlocked (GDBusWorker *worker,
|
||||
static void
|
||||
schedule_pending_close (GDBusWorker *worker)
|
||||
{
|
||||
if (!worker->pending_close_attempts)
|
||||
return;
|
||||
|
||||
schedule_writing_unlocked (worker, NULL, NULL, NULL);
|
||||
g_mutex_lock (&worker->write_lock);
|
||||
if (worker->pending_close_attempts)
|
||||
schedule_writing_unlocked (worker, NULL, NULL, NULL);
|
||||
g_mutex_unlock (&worker->write_lock);
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------------- */
|
||||
|
Loading…
Reference in New Issue
Block a user