[gnome-keyring/dbus-api] [daemon] Support calling pkcs11 code from mainloop.
- From: Stefan Walter <stefw src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-keyring/dbus-api] [daemon] Support calling pkcs11 code from mainloop.
- Date: Sun, 23 Aug 2009 01:59:13 +0000 (UTC)
commit a631446b97c99f08f93bbf0d864aede11e875148
Author: Stef Walter <stef memberwebs com>
Date: Sat Aug 22 23:44:57 2009 +0000
[daemon] Support calling pkcs11 code from mainloop.
The old daemon code uses gkr_daemon_async_xxx() functionality.
Make the concurrency locking functionality disabled when
already in the mainloop
daemon/util/gkr-daemon-async.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/daemon/util/gkr-daemon-async.c b/daemon/util/gkr-daemon-async.c
index c80886a..8406f11 100644
--- a/daemon/util/gkr-daemon-async.c
+++ b/daemon/util/gkr-daemon-async.c
@@ -503,6 +503,9 @@ gkr_daemon_async_begin_concurrent (void)
{
g_assert (async_mutex);
+ if (g_static_private_get (&thread_private) == NULL)
+ return;
+
/* Let another worker or the main loop run */
DO_UNLOCK (async_mutex);
}
@@ -512,6 +515,9 @@ gkr_daemon_async_end_concurrent (void)
{
g_assert (async_mutex);
+ if (g_static_private_get (&thread_private) == NULL)
+ return;
+
/* Make sure only one thread is running */
DO_LOCK (async_mutex);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]