diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2009-04-21 22:58:02 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2009-04-21 22:59:25 +0800 |
commit | d5a1d263c64667a98f42a80b47a50d7359d83119 (patch) | |
tree | b333d883c51017a560d45c1654d7d35c40bc0c1f /src | |
parent | d0fcb58a5ffb5e4025dcac522e3dbc94930c4124 (diff) | |
download | gsoc2013-empathy-d5a1d263c64667a98f42a80b47a50d7359d83119.tar gsoc2013-empathy-d5a1d263c64667a98f42a80b47a50d7359d83119.tar.gz gsoc2013-empathy-d5a1d263c64667a98f42a80b47a50d7359d83119.tar.bz2 gsoc2013-empathy-d5a1d263c64667a98f42a80b47a50d7359d83119.tar.lz gsoc2013-empathy-d5a1d263c64667a98f42a80b47a50d7359d83119.tar.xz gsoc2013-empathy-d5a1d263c64667a98f42a80b47a50d7359d83119.tar.zst gsoc2013-empathy-d5a1d263c64667a98f42a80b47a50d7359d83119.zip |
don't dispatch D-Bus tube having an invalid ServiceName
Diffstat (limited to 'src')
-rw-r--r-- | 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 b1e7bce6d..63b31b2b6 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 { |