[empathy: 1/3] don't dispatch D-Bus tube having an invalid ServiceName
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: svn-commits-list gnome org
- Subject: [empathy: 1/3] don't dispatch D-Bus tube having an invalid ServiceName
- Date: Tue, 21 Apr 2009 11:06:17 -0400 (EDT)
commit d5a1d263c64667a98f42a80b47a50d7359d83119
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Tue Apr 21 15:58:02 2009 +0100
don't dispatch D-Bus tube having an invalid ServiceName
---
src/empathy-tube-dispatch.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/src/empathy-tube-dispatch.c b/src/empathy-tube-dispatch.c
index b1e7bce..63b31b2 100644
--- a/src/empathy-tube-dispatch.c
+++ b/src/empathy-tube-dispatch.c
@@ -167,9 +167,20 @@ empathy_tube_dispatch_constructed (GObject *object)
}
else if (!tp_strdiff (channel_type, EMP_IFACE_CHANNEL_TYPE_DBUS_TUBE))
{
+ GError *error = NULL;
+
type = TP_TUBE_TYPE_DBUS;
service = tp_asv_get_string (properties,
EMP_IFACE_CHANNEL_TYPE_DBUS_TUBE ".ServiceName");
+
+ if (!tp_dbus_check_valid_bus_name (service, TP_DBUS_NAME_TYPE_WELL_KNOWN,
+ &error))
+ {
+ DEBUG ("Can't dispatch tube; invalid ServiceName %s: %s", service,
+ error->message);
+ g_error_free (error);
+ goto failed;
+ }
}
else
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]