Fix: Changed service_name due to some issues with qdbusviewer e.g.
authorsingesang <singesang@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Tue, 14 Oct 2008 10:31:10 +0000 (10:31 +0000)
committersingesang <singesang@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Tue, 14 Oct 2008 10:31:10 +0000 (10:31 +0000)
git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@1461 ffa7fe5e-494d-0410-b361-a75ebd5db220

navit/navit/binding/dbus/binding_dbus.c
navit/navit/binding/dbus/test.py

index a6b14fb..b22b183 100644 (file)
@@ -36,7 +36,7 @@
 
 static DBusConnection *connection;
 
-static char *service_name="org.navit-project.navit";
+static char *service_name="org.navit_project.navit";
 static char *object_path="/org/navit_project/navit";
 
 GHashTable *object_hash;
@@ -448,9 +448,9 @@ navit_handler_func(DBusConnection *connection, DBusMessage *message, void *user_
                DBusMessage *reply;
                gchar *idata;
                dbg(0,"Introspect\n");
-               if (! strcmp(dbus_message_get_path(message), "/org/navit_project/navit")) {
+               if (! strcmp(dbus_message_get_path(message), object_path)) {
                        g_file_get_contents("binding/dbus/navit.introspect", &idata, NULL, NULL);
-                       reply = dbus_message_new_method_return(http://www.http.com//message);
+                       reply = dbus_message_new_method_return(message);
                        dbus_message_append_args(reply, DBUS_TYPE_STRING, &idata, DBUS_TYPE_INVALID);
                        dbus_connection_send (connection, reply, NULL);
                        dbus_message_unref (reply);
@@ -460,7 +460,7 @@ navit_handler_func(DBusConnection *connection, DBusMessage *message, void *user_
        }
 #endif
        for (i = 0 ; i < sizeof(dbus_methods)/sizeof(struct dbus_method) ; i++) {
-               path=g_strdup_printf("org.navit_project.navit%s", dbus_methods[i].path);
+               path=g_strdup_printf("%s%s", service_name, dbus_methods[i].path);
                if (dbus_message_is_method_call(message, path, dbus_methods[i].method) &&
                    dbus_message_has_signature(message, dbus_methods[i].signature)) {
                        g_free(path);
index 5f69fdd..6447648 100755 (executable)
@@ -1,11 +1,11 @@
 #! /usr/bin/python
 import dbus
 bus = dbus.SessionBus()
-conn = bus.get_object('org.navit-project.navit',
+conn = bus.get_object('org.navit_project.navit',
                        '/org/navit_project/navit')
 iface = dbus.Interface(conn, dbus_interface='org.navit_project.navit');
 iter=iface.iter();
-navit=bus.get_object('org.navit-project.navit', conn.get_navit(iter));
+navit=bus.get_object('org.navit_project.navit', conn.get_navit(iter));
 iface.iter_destroy(iter);
 navit_iface = dbus.Interface(navit, dbus_interface='org.navit_project.navit.navit');
 navit_iface.set_center((1,0x138a4a,0x5d773f));