]> git.0d.be Git - empathy.git/commitdiff
Ensure we don't try to register invalid bus names
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>
Tue, 1 Sep 2009 15:20:35 +0000 (16:20 +0100)
committerSjoerd Simons <sjoerd.simons@collabora.co.uk>
Mon, 19 Oct 2009 16:47:11 +0000 (17:47 +0100)
libempathy/empathy-handler.c

index 8374a00a1193dcd8920c34ed5c7f8b411dea7826..ad4f415e0ce5567777662df4809eef7241661874 100644 (file)
@@ -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;