]> git.0d.be Git - empathy.git/commitdiff
use tp_channel_dispatch_operation_close_channels_async() when rejecting server auth...
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Mon, 30 May 2011 13:36:36 +0000 (15:36 +0200)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Wed, 22 Jun 2011 07:12:08 +0000 (09:12 +0200)
We can't use it for other channel types as the EmpathyTp* object is doing some
extra work.

src/empathy-event-manager.c

index c413be020c666160db3c6e43f2f9ef5482a8dac2..dbb95cda947b70370b15bdef078a2c0d3d1f9624 100644 (file)
@@ -431,26 +431,6 @@ out:
   g_object_unref (user_data);
 }
 
-static void
-reject_auth_channel_claim_cb (GObject *source,
-    GAsyncResult *result,
-    gpointer user_data)
-{
-  TpChannelDispatchOperation *cdo = TP_CHANNEL_DISPATCH_OPERATION (source);
-  GError *error = NULL;
-
-  if (!tp_channel_dispatch_operation_claim_with_finish (cdo, result, &error))
-    {
-      DEBUG ("Failed to claim channel: %s", error->message);
-
-      g_error_free (error);
-      return;
-    }
-
-  tp_cli_channel_call_close (TP_CHANNEL (user_data), -1,
-      NULL, NULL, NULL, NULL);
-}
-
 static void
 reject_approval (EventManagerApproval *approval)
 {
@@ -472,9 +452,8 @@ reject_approval (EventManagerApproval *approval)
   else if (tp_channel_get_channel_type_id (approval->main_channel)
       == TP_IFACE_QUARK_CHANNEL_TYPE_SERVER_AUTHENTICATION)
     {
-      tp_channel_dispatch_operation_claim_with_async (approval->operation,
-          priv->auth_approver, reject_auth_channel_claim_cb,
-          approval->main_channel);
+      tp_channel_dispatch_operation_close_channels_async (approval->operation,
+          NULL, NULL);
     }
 }