[Telepathy-commits] [telepathy-gabble/master] GabbleOLPCGadgetManager: don't redundantly check TargetHandle

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


TpBaseConnection already checks that the arguments are internally
consistent, so it's sufficient to check TargetHandleType.
---
 src/olpc-gadget-manager.c |   12 ++++--------
 1 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/src/olpc-gadget-manager.c b/src/olpc-gadget-manager.c
index db3f036..1665825 100644
--- a/src/olpc-gadget-manager.c
+++ b/src/olpc-gadget-manager.c
@@ -292,10 +292,8 @@ create_buddy_view_channel (GabbleOlpcGadgetManager *self,
       return NULL;
     }
 
-  if ((tp_asv_get_uint32 (request_properties,
-       TP_IFACE_CHANNEL ".TargetHandleType", NULL) != 0) ||
-      (tp_asv_get_uint32 (request_properties,
-      TP_IFACE_CHANNEL ".TargetHandle", NULL) != 0))
+  if (tp_asv_get_uint32 (request_properties,
+       TP_IFACE_CHANNEL ".TargetHandleType", NULL) != 0)
     {
       g_set_error (error, TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
           "Views channels can't have a target handle");
@@ -364,10 +362,8 @@ create_activity_view_channel (GabbleOlpcGadgetManager *self,
       return NULL;
     }
 
-  if ((tp_asv_get_uint32 (request_properties,
-       TP_IFACE_CHANNEL ".TargetHandleType", NULL) != 0) ||
-      (tp_asv_get_uint32 (request_properties,
-      TP_IFACE_CHANNEL ".TargetHandle", NULL) != 0))
+  if (tp_asv_get_uint32 (request_properties,
+       TP_IFACE_CHANNEL ".TargetHandleType", NULL) != 0)
     {
       g_set_error (error, TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
           "Views channels can't have a target handle");
-- 
1.5.6.5




More information about the Telepathy-commits mailing list