[libgovirt] proxy: Fix bug in 'cancelled' disconnection after async calls
- From: Christophe Fergeau <teuf src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgovirt] proxy: Fix bug in 'cancelled' disconnection after async calls
- Date: Mon, 3 Aug 2015 15:56:16 +0000 (UTC)
commit 29d9e36c4cace254540c7f9a523bd1c92f79974c
Author: Christophe Fergeau <cfergeau redhat com>
Date: Mon Aug 3 14:23:28 2015 +0200
proxy: Fix bug in 'cancelled' disconnection after async calls
9aa3aec8 added disconnection of the 'cancelled' signal on the
cancellable in async calls once the async call has completed to prevent
a crash. However, there was a bug in this patch as we only disconnect
from 'cancelled' if data->cancellable is not NULL, and there was one
code path where setting data->cancellable was forgotten.
A few refactorings later, the buggy codepath is the only one which
remains, so the bug fixed in 9aa3aec8 is back...
This commit makes sure data->cancellable is set when needed.
govirt/ovirt-proxy.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/govirt/ovirt-proxy.c b/govirt/ovirt-proxy.c
index d2c1d47..c6cc519 100644
--- a/govirt/ovirt-proxy.c
+++ b/govirt/ovirt-proxy.c
@@ -283,6 +283,7 @@ void ovirt_rest_call_async(OvirtRestCall *call,
data->call_user_data = user_data;
data->destroy_call_data = destroy_func;
if (cancellable != NULL) {
+ data->cancellable = cancellable;
data->cancellable_cb_id = g_cancellable_connect(cancellable,
G_CALLBACK (call_async_cancelled_cb),
call, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]