From 6ae71080bf117f76345e2d868d1e346c6021a0c1 Mon Sep 17 00:00:00 2001 From: Sjoerd Simons Date: Tue, 1 Sep 2009 16:20:35 +0100 Subject: [PATCH] Ensure we don't try to register invalid bus names --- libempathy/empathy-handler.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/libempathy/empathy-handler.c b/libempathy/empathy-handler.c index 8374a00a..ad4f415e 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; -- 2.39.2