[empathy/gnome-2-28] Ensure we don't try to register invalid bus names



commit e85e1ed7fa300a90f6be8037779c7e48b88cacc6
Author: Sjoerd Simons <sjoerd simons collabora co uk>
Date:   Tue Sep 1 16:20:35 2009 +0100

    Ensure we don't try to register invalid bus names

 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 9a59788..c0a6c13 100644
--- a/libempathy/empathy-handler.c
+++ b/libempathy/empathy-handler.c
@@ -149,13 +149,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;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]