From 775a3530f5cb6d8709a76e0c2f55324adf78d6c0 Mon Sep 17 00:00:00 2001 From: Christophe Fergeau Date: Mon, 3 Aug 2015 14:23:28 +0200 Subject: [PATCH 1/3] 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 file changed, 1 insertion(+) diff --git a/govirt/ovirt-proxy.c b/govirt/ovirt-proxy.c index 81f3f98..28f8e8a 100644 --- a/govirt/ovirt-proxy.c +++ b/govirt/ovirt-proxy.c @@ -284,6 +284,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); -- 2.9.3