[tracker/dbus-fd-experiment] libtracker-client: Unspaghetize tracker_cancel_call
- From: Adrien Bustany <abustany src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/dbus-fd-experiment] libtracker-client: Unspaghetize tracker_cancel_call
- Date: Thu, 17 Jun 2010 14:47:45 +0000 (UTC)
commit d3f361becb156d029efe478444e87a6b7e868a96
Author: Adrien Bustany <abustany gnome org>
Date: Thu Jun 17 10:43:30 2010 -0400
libtracker-client: Unspaghetize tracker_cancel_call
src/libtracker-client/tracker.c | 24 ++++++------------------
1 files changed, 6 insertions(+), 18 deletions(-)
---
diff --git a/src/libtracker-client/tracker.c b/src/libtracker-client/tracker.c
index 14b0f9d..0d29817 100644
--- a/src/libtracker-client/tracker.c
+++ b/src/libtracker-client/tracker.c
@@ -1450,16 +1450,6 @@ tracker_cancel_call (TrackerClient *client,
if (data) {
FastPendingCallData *fast_data = data;
FastAsyncData *async_data = fast_data->data;
- GInputStream *base_input_stream;
-
- if (fast_data->cancellable) {
- /* When cancelling a GIO call, the callback is called with an
- * error, so we do the cleanup there
- */
- g_cancellable_cancel (fast_data->cancellable);
-
- return TRUE;
- }
if (async_data->dbus_call) {
dbus_pending_call_cancel (async_data->dbus_call);
@@ -1467,25 +1457,23 @@ tracker_cancel_call (TrackerClient *client,
switch (async_data->operation) {
case FAST_QUERY:
- base_input_stream = g_filter_input_stream_get_base_stream (G_FILTER_INPUT_STREAM (async_data->input_stream));
- g_object_unref (async_data->input_stream);
- g_object_unref (base_input_stream);
- g_object_unref (async_data->output_stream);
-
- /* Fall through */
+ /* When cancelling a GIO call, the callback is called with an
+ * error, so we do the cleanup there
+ */
+ g_cancellable_cancel (fast_data->cancellable);
+ break;
case FAST_UPDATE:
case FAST_UPDATE_BLANK:
case FAST_UPDATE_BATCH:
/* dbus_pending_call_cancel does unref the call, so no need to
* unref it here
*/
+ g_slice_free (FastAsyncData, async_data);
break;
default:
g_assert_not_reached ();
}
- g_slice_free (FastAsyncData, async_data);
-
g_hash_table_remove (private->fast_pending_calls,
GUINT_TO_POINTER (call_id));
return TRUE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]