]> git.0d.be Git - empathy.git/commitdiff
Unset pending_call explicitly instead of implicitly
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>
Mon, 19 Oct 2009 15:58:43 +0000 (16:58 +0100)
committerSjoerd Simons <sjoerd.simons@collabora.co.uk>
Mon, 19 Oct 2009 16:47:03 +0000 (17:47 +0100)
libempathy/empathy-dispatcher.c

index cc0c8198b8fe554e6c9266f462a0c3936c78ff07..1cb418977b9d9f8cd13dabeb2d4e30be40b83341 100644 (file)
@@ -254,6 +254,9 @@ free_dispatcher_request_data (DispatcherRequestData *r)
   if (r->request != NULL)
     g_hash_table_unref (r->request);
 
+  if (r->pending_call != NULL)
+    tp_proxy_pending_call_cancel (r->pending_call);
+
   g_slice_free (DispatcherRequestData, r);
 }
 
@@ -285,8 +288,6 @@ free_connection_data (ConnectionData *cd)
 
   for (l = cd->outstanding_requests ; l != NULL; l = g_list_delete_link (l,l))
     {
-      DispatcherRequestData *data = l->data;
-      tp_proxy_pending_call_cancel (data->pending_call);
       free_dispatcher_request_data (l->data);
     }
 
@@ -1302,6 +1303,8 @@ dispatcher_request_channel_cb (TpConnection *connection,
   EmpathyDispatcher *dispatcher =
       EMPATHY_DISPATCHER (request_data->dispatcher);
 
+  request_data->pending_call = NULL;
+
   dispatcher_connection_new_requested_channel (dispatcher,
     request_data, object_path, NULL, error);
 }
@@ -1438,6 +1441,8 @@ dispatcher_request_handles_cb (TpConnection *connection,
 {
   DispatcherRequestData *request_data = (DispatcherRequestData *) user_data;
 
+  request_data->pending_call = NULL;
+
   if (error != NULL)
     {
       EmpathyDispatcher *dispatcher = EMPATHY_DISPATCHER (object);
@@ -1510,6 +1515,8 @@ dispatcher_create_channel_cb (TpConnection *connect,
   EmpathyDispatcher *dispatcher =
       EMPATHY_DISPATCHER (request_data->dispatcher);
 
+  request_data->pending_call = NULL;
+
   dispatcher_connection_new_requested_channel (dispatcher,
     request_data, object_path, properties, error);
 }
@@ -1527,6 +1534,8 @@ dispatcher_ensure_channel_cb (TpConnection *connect,
   EmpathyDispatcher *dispatcher =
       EMPATHY_DISPATCHER (request_data->dispatcher);
 
+  request_data->pending_call = NULL;
+
   dispatcher_connection_new_requested_channel (dispatcher,
     request_data, object_path, properties, error);
 }