diff options
author | Sjoerd Simons <sjoerd.simons@collabora.co.uk> | 2009-09-01 23:20:35 +0800 |
---|---|---|
committer | Sjoerd Simons <sjoerd.simons@collabora.co.uk> | 2009-10-20 00:47:11 +0800 |
commit | 6ae71080bf117f76345e2d868d1e346c6021a0c1 (patch) | |
tree | 068db994cad020590eabd264dc63bc8cd0d6ab7d /libempathy/empathy-handler.c | |
parent | 82063856bf2a278db370af8807c97e4e9c289afc (diff) | |
download | gsoc2013-empathy-6ae71080bf117f76345e2d868d1e346c6021a0c1.tar gsoc2013-empathy-6ae71080bf117f76345e2d868d1e346c6021a0c1.tar.gz gsoc2013-empathy-6ae71080bf117f76345e2d868d1e346c6021a0c1.tar.bz2 gsoc2013-empathy-6ae71080bf117f76345e2d868d1e346c6021a0c1.tar.lz gsoc2013-empathy-6ae71080bf117f76345e2d868d1e346c6021a0c1.tar.xz gsoc2013-empathy-6ae71080bf117f76345e2d868d1e346c6021a0c1.tar.zst gsoc2013-empathy-6ae71080bf117f76345e2d868d1e346c6021a0c1.zip |
Ensure we don't try to register invalid bus names
Diffstat (limited to 'libempathy/empathy-handler.c')
-rw-r--r-- | libempathy/empathy-handler.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/libempathy/empathy-handler.c b/libempathy/empathy-handler.c index 8374a00a1..ad4f415e0 100644 --- a/libempathy/empathy-handler.c +++ b/libempathy/empathy-handler.c @@ -175,13 +175,14 @@ handler_set_property (GObject *object, break; case PROP_NAME: priv->name = g_value_dup_string (value); - if (EMP_STR_EMPTY (priv->name)) - { - TpDBusDaemon *bus; + if (EMP_STR_EMPTY (priv->name)) + { + TpDBusDaemon *bus; - bus = tp_dbus_daemon_dup (NULL); - priv->name = g_strdup_printf ("%s%p", + bus = tp_dbus_daemon_dup (NULL); + priv->name = g_strdup_printf ("badger_%s_%p", tp_dbus_daemon_get_unique_name (bus), object); + g_strdelimit (priv->name, ":.", '_'); g_object_unref (bus); } break; |