[Pkg-e-commits] [SCM] D-Bus integration for EFL based applications branch, upstream-vcs, updated. de96e02c71c95d629bfde702b223060254b81ef7

ulisses ulisses at alioth.debian.org
Sat May 24 16:10:44 UTC 2008


The following commit has been merged in the upstream-vcs branch:
commit 8ca8ce28e8a6e537960ce7e7ceb3886b296d686c
Author: ulisses <ulisses>
Date:   Tue Mar 25 23:19:12 2008 +0000

    Fix segfault when using private buses (other than system and session).
    
    When using private buses in Python (with python-e_dbus and python-dbus) the
    program always segfaults trying to setup the integration of D-Bus with Ecore
    mainloop. The problem is by the time the setup function is called the
    connection with the private bus is not registered yet and then we're
    segfaulting at this line of e_dbus_connection_new():
    
      cd->conn_name = strdup(dbus_bus_get_unique_name(conn));
    
    This patch just adds a test to see if we're already registered or not. However,
    we need to add proper support for private buses to e_dbus.

diff --git a/src/lib/dbus/e_dbus.c b/src/lib/dbus/e_dbus.c
index 01c8bea..eefbf31 100644
--- a/src/lib/dbus/e_dbus.c
+++ b/src/lib/dbus/e_dbus.c
@@ -142,14 +142,20 @@ static E_DBus_Connection *
 e_dbus_connection_new(DBusConnection *conn)
 {
   E_DBus_Connection *cd;
+  const char *conn_name;
 
   cd = calloc(1, sizeof(E_DBus_Connection));
   if (!cd) return NULL;
 
   cd->conn = conn;
-  cd->conn_name = strdup(dbus_bus_get_unique_name(conn));
-
-  DEBUG(1, "Connected! Name: %s\n", cd->conn_name);
+  conn_name = dbus_bus_get_unique_name(conn);
+  if (conn_name)
+  {
+    DEBUG(1, "Connected! Name: %s\n", conn_name);
+    cd->conn_name = strdup(conn_name);
+  }
+  else
+    DEBUG(1, "Not connected\n");
 
   cd->shared_type = -1;
   cd->fd_handlers = ecore_list_new();

-- 
D-Bus integration for EFL based applications



More information about the Pkg-e-commits mailing list