[Telepathy-commits] [telepathy-gabble/master] MediaFactory: include TargetID in allowed; reject unknown properties
Will Thompson
will.thompson at collabora.co.uk
Wed Sep 10 08:34:50 PDT 2008
---
src/media-factory.c | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/src/media-factory.c b/src/media-factory.c
index 3306ba2..fd307b0 100644
--- a/src/media-factory.c
+++ b/src/media-factory.c
@@ -836,8 +836,15 @@ gabble_media_factory_foreach_channel (TpChannelManager *manager,
}
+static const gchar * const media_channel_fixed_properties[] = {
+ TP_IFACE_CHANNEL ".ChannelType",
+ TP_IFACE_CHANNEL ".TargetHandleType",
+ NULL
+};
+
static const gchar * const named_channel_allowed_properties[] = {
TP_IFACE_CHANNEL ".TargetHandle",
+ TP_IFACE_CHANNEL ".TargetID",
NULL
};
@@ -922,6 +929,11 @@ gabble_media_factory_request_channel (TpChannelManager *manager,
goto error;
}
+ if (tp_channel_manager_asv_has_unknown_properties (request_properties,
+ media_channel_fixed_properties, anon_channel_allowed_properties,
+ &error))
+ goto error;
+
channel = new_media_channel (self, conn->self_handle);
break;
@@ -931,6 +943,11 @@ gabble_media_factory_request_channel (TpChannelManager *manager,
handle, &error))
goto error;
+ if (tp_channel_manager_asv_has_unknown_properties (request_properties,
+ media_channel_fixed_properties, named_channel_allowed_properties,
+ &error))
+ goto error;
+
channel = new_media_channel (self, conn->self_handle);
if (!_gabble_media_channel_add_member ((GObject *) channel, handle,
--
1.5.6.5
More information about the Telepathy-commits
mailing list