[Telepathy-commits] [telepathy-gabble/master] GabbleIMFactory: don't redundantly validate TargetHandle

Simon McVittie simon.mcvittie at collabora.co.uk
Wed Nov 5 03:46:15 PST 2008


TpBaseConnection already did this.
---
 src/im-factory.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/im-factory.c b/src/im-factory.c
index 49758dc..2ec1c53 100644
--- a/src/im-factory.c
+++ b/src/im-factory.c
@@ -518,8 +518,6 @@ gabble_im_factory_requestotron (GabbleImFactory *self,
                                 gboolean require_new)
 {
   TpBaseConnection *base_conn = (TpBaseConnection *) self->priv->conn;
-  TpHandleRepoIface *contact_repo = tp_base_connection_get_handles (
-      base_conn, TP_HANDLE_TYPE_CONTACT);
   TpHandle handle;
   GError *error = NULL;
   TpExportableChannel *channel;
@@ -532,11 +530,10 @@ gabble_im_factory_requestotron (GabbleImFactory *self,
         TP_IFACE_CHANNEL ".TargetHandleType", NULL) != TP_HANDLE_TYPE_CONTACT)
     return FALSE;
 
+  /* validity already checked by TpBaseConnection */
   handle = tp_asv_get_uint32 (request_properties,
       TP_IFACE_CHANNEL ".TargetHandle", NULL);
-
-  if (!tp_handle_is_valid (contact_repo, handle, &error))
-    goto error;
+  g_assert (handle != 0);
 
   if (tp_channel_manager_asv_has_unknown_properties (request_properties,
           im_channel_fixed_properties, im_channel_allowed_properties,
-- 
1.5.6.5




More information about the Telepathy-commits mailing list