[Telepathy-commits] [telepathy-glib/master] Reject channel requests containing Initiator{Handle, ID}, Requested
Will Thompson
will.thompson at collabora.co.uk
Fri Jan 2 09:57:34 PST 2009
---
telepathy-glib/base-connection.c | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/telepathy-glib/base-connection.c b/telepathy-glib/base-connection.c
index 916c40a..8671a36 100644
--- a/telepathy-glib/base-connection.c
+++ b/telepathy-glib/base-connection.c
@@ -2910,8 +2910,17 @@ conn_requests_check_basic_properties (TpBaseConnection *self,
TP_IFACE_CHANNEL ".TargetID") != NULL)
RETURN_INVALID_ARGUMENT ("TargetID must be a string");
- /* FIXME: when InitiatorHandle, InitiatorID and Requested are officially
- * supported, if the request has any of them, raise an error */
+ if (tp_asv_lookup (requested_properties, TP_IFACE_CHANNEL ".InitiatorHandle")
+ != NULL)
+ RETURN_INVALID_ARGUMENT ("InitiatorHandle may not be requested");
+
+ if (tp_asv_lookup (requested_properties, TP_IFACE_CHANNEL ".InitiatorID")
+ != NULL)
+ RETURN_INVALID_ARGUMENT ("InitiatorID may not be requested");
+
+ if (tp_asv_lookup (requested_properties, TP_IFACE_CHANNEL ".Requested")
+ != NULL)
+ RETURN_INVALID_ARGUMENT ("Requested may not be requested");
conn_requests_requestotron_validate_handle (self,
requested_properties, method,
--
1.5.6.5
More information about the Telepathy-commits
mailing list