[Telepathy-commits] [telepathy-gabble/master] olpc-gadget-manager.c: check if MaxSize is not zero
Guillaume Desmottes
guillaume.desmottes at collabora.co.uk
Tue Oct 7 09:44:02 PDT 2008
---
src/olpc-gadget-manager.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/src/olpc-gadget-manager.c b/src/olpc-gadget-manager.c
index 98054c4..1f9f887 100644
--- a/src/olpc-gadget-manager.c
+++ b/src/olpc-gadget-manager.c
@@ -322,6 +322,14 @@ gabble_olpc_gadget_manager_handle_request (TpChannelManager *manager,
goto error;
}
+ if (max_size == 0)
+ {
+
+ g_set_error (&error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ "max have to be greater than 0");
+ goto error;
+ }
+
properties = tp_asv_get_boxed (request_properties,
GABBLE_IFACE_OLPC_CHANNEL_TYPE_BUDDYVIEW ".Properties",
TP_HASH_TYPE_STRING_VARIANT_MAP);
--
1.5.6.5
More information about the Telepathy-commits
mailing list