[Telepathy-commits] [telepathy-gabble/master] raise an error if SearchActivitiesByParticipant is called without participant
Guillaume Desmottes
guillaume.desmottes at collabora.co.uk
Fri Sep 26 10:02:53 PDT 2008
20080730110725-7fe3f-4eab987556f5b305a22453898f52d709263f6069.gz
---
src/conn-olpc.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/src/conn-olpc.c b/src/conn-olpc.c
index e4909bb..ee4a3b5 100644
--- a/src/conn-olpc.c
+++ b/src/conn-olpc.c
@@ -4213,6 +4213,16 @@ olpc_gadget_search_activities_by_participants (GabbleSvcOLPCGadget *iface,
TpHandleRepoIface *contact_repo = tp_base_connection_get_handles (
(TpBaseConnection *) conn, TP_HANDLE_TYPE_CONTACT);
+ if (participants->len == 0)
+ {
+ GError error = { TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ "you must pass at least one participant" };
+
+ DEBUG ("%s", error.message);
+ dbus_g_method_return_error (context, &error);
+ return;
+ }
+
if (!check_gadget_activity (conn, context))
return;
--
1.5.6.5
More information about the Telepathy-commits
mailing list