[Telepathy-commits] [telepathy-glib/master] BaseConnection: different errors for both and neither of Target{Handle, ID}
Will Thompson
will.thompson at collabora.co.uk
Wed Sep 17 04:24:02 PDT 2008
---
telepathy-glib/base-connection.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/telepathy-glib/base-connection.c b/telepathy-glib/base-connection.c
index 85179f4..ddb96a7 100644
--- a/telepathy-glib/base-connection.c
+++ b/telepathy-glib/base-connection.c
@@ -2588,10 +2588,13 @@ conn_requests_requestotron_validate_handle (TpBaseConnection *self,
{
GError *error = NULL;
- if ((target_handle == 0 && target_id == NULL) ||
- (target_handle != 0 && target_id != NULL))
- RETURN_INVALID_ARGUMENT ("Exactly one of TargetHandle and TargetID "
- "must be supplied if TargetHandleType is not None");
+ if (target_handle == 0 && target_id == NULL)
+ RETURN_INVALID_ARGUMENT ("When TargetHandleType is not None, either "
+ "TargetHandle or TargetID must also be given");
+
+ if (target_handle != 0 && target_id != NULL)
+ RETURN_INVALID_ARGUMENT (
+ "TargetHandle and TargetID must not both be given");
handles = tp_base_connection_get_handles (self, target_handle_type);
--
1.5.6.5
More information about the Telepathy-commits
mailing list