[Telepathy-commits] [telepathy-gabble/master] GabbleMediaFactory: don't redundantly validate TargetHandle
Simon McVittie
simon.mcvittie at collabora.co.uk
Wed Nov 5 03:53:38 PST 2008
TpBaseConnection already checks it, so we don't need to do so again.
---
src/media-factory.c | 15 ++++-----------
1 files changed, 4 insertions(+), 11 deletions(-)
diff --git a/src/media-factory.c b/src/media-factory.c
index a5b528a..d3da347 100644
--- a/src/media-factory.c
+++ b/src/media-factory.c
@@ -947,13 +947,8 @@ gabble_media_factory_requestotron (TpChannelManager *manager,
switch (handle_type)
{
case TP_HANDLE_TYPE_NONE:
- if (handle != 0)
- {
- g_set_error (&error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
- "TargetHandle must be zero or omitted if TargetHandleType is "
- "NONE");
- goto error;
- }
+ /* already checked by TpBaseConnection */
+ g_assert (handle == 0);
if (require_target_handle)
{
@@ -972,10 +967,8 @@ gabble_media_factory_requestotron (TpChannelManager *manager,
break;
case TP_HANDLE_TYPE_CONTACT:
- if (!tp_handle_is_valid (
- tp_base_connection_get_handles (conn, TP_HANDLE_TYPE_CONTACT),
- handle, &error))
- goto error;
+ /* validity already checked by TpBaseConnection */
+ g_assert (handle != 0);
if (tp_channel_manager_asv_has_unknown_properties (request_properties,
media_channel_fixed_properties, named_channel_allowed_properties,
--
1.5.6.5
More information about the Telepathy-commits
mailing list