Fix possible threading race condition in gp11.
authorStef Walter <stef@memberwebs.com>
Tue, 8 Jun 2010 05:20:18 +0000 (05:20 +0000)
committerStef Walter <stef@memberwebs.com>
Tue, 8 Jun 2010 15:59:24 +0000 (15:59 +0000)
We weren't waking up the main loop when we were ready to process
a response from an async operation in certain cases.

gp11/gp11-call.c

index 1adb429..cdc6ed7 100644 (file)
@@ -530,6 +530,7 @@ _gp11_call_async_short (GP11Call *call, CK_RV rv)
        /* Already complete, so just push it for processing in main loop */
        g_assert (GP11_CALL_GET_CLASS (call)->completed_queue);
        g_async_queue_push (GP11_CALL_GET_CLASS (call)->completed_queue, call);
+       g_main_context_wakeup (NULL);
 }
 
 gpointer