[Pkg-telepathy-commits] [telepathy-glib-1] 182/212: tp_dbus_connection_try_register_object: disallow GDBusObject-but-not-GDBusObjectSkeleton
Simon McVittie
smcv at debian.org
Wed May 14 12:09:13 UTC 2014
This is an automated email from the git hooks/post-receive script.
smcv pushed a commit to branch debian
in repository telepathy-glib-1.
commit 928bd2ee65f143b3139d426946f25cef1dcad26d
Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date: Wed Apr 16 14:58:47 2014 +0100
tp_dbus_connection_try_register_object: disallow GDBusObject-but-not-GDBusObjectSkeleton
Reviewed-by: Xavier Claessens <xavier.claessens at collabora.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=77189
---
telepathy-glib/dbus.c | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/telepathy-glib/dbus.c b/telepathy-glib/dbus.c
index 35dc4ad..7310afb 100644
--- a/telepathy-glib/dbus.c
+++ b/telepathy-glib/dbus.c
@@ -772,8 +772,12 @@ tp_dbus_connection_registration_free (gpointer p)
* @object_path: an object path
* @object: (type GObject.Object) (transfer none): an object to export
*
- * Export @object at @object_path. Its `TpSvc` interfaces will all
- * be exported.
+ * Export @object at @object_path:
+ *
+ * * if it is a #GDBusObjectSkeleton, it will be exported
+ * * if it is a #GDBusObject but not a #GDBusObjectSkeleton, it is
+ * considered to be a programming error
+ * * otherwise, its `TpSvc` interfaces will all be exported
*
* It is considered to be a programming error to register an object
* at a path where another object already exists.
@@ -932,6 +936,13 @@ tp_dbus_connection_try_register_object (GDBusConnection *dbus_connection,
g_return_val_if_fail (tp_dbus_check_valid_object_path (object_path, error),
FALSE);
g_return_val_if_fail (G_IS_OBJECT (object), FALSE);
+ /* If it implements GDBusObject then it must currently be a
+ * GDBusObjectSkeleton. The implementation doesn't actually assume that,
+ * as long as its interfaces are GDBusInterfaceSkeletons - we could
+ * relax this (to allow for objects that proxy a GDBusObjectSkeleton's
+ * interfaces, for instance) if needed. */
+ g_return_val_if_fail (G_IS_DBUS_OBJECT_SKELETON (object) ||
+ !G_IS_DBUS_OBJECT (object), FALSE);
conn = dbus_connection;
r = g_slice_new0 (Registration);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-telepathy/telepathy-glib-1.git
More information about the Pkg-telepathy-commits
mailing list