[Telepathy-commits] [telepathy-gabble/master] GabblePrivateTubesFactory: don't redundantly validate TargetHandle
Simon McVittie
simon.mcvittie at collabora.co.uk
Wed Nov 5 03:48:01 PST 2008
TpBaseConnection already checks it, so we don't need to do so again.
---
src/private-tubes-factory.c | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/src/private-tubes-factory.c b/src/private-tubes-factory.c
index de49d3a..cad5fd5 100644
--- a/src/private-tubes-factory.c
+++ b/src/private-tubes-factory.c
@@ -623,8 +623,6 @@ gabble_private_tubes_factory_requestotron (GabblePrivateTubesFactory *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;
GabbleTubesChannel *channel;
@@ -693,11 +691,10 @@ gabble_private_tubes_factory_requestotron (GabblePrivateTubesFactory *self,
}
}
+ /* 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);
/* Don't support opening a channel to our self handle */
if (handle == base_conn->self_handle)
--
1.5.6.5
More information about the Telepathy-commits
mailing list