[PATCH] Fix bus names in test case so it actually works.

Scott James Remnant scott at netsplit.com
Fri Jul 18 06:33:02 PDT 2008


* test/name-test/test-privserver.c (filter_session_message, main),
* test/name-test/test-privserver-client.c (open_shutdown_private_connection):
  Replace TestServer with PrivServer to match the service definition files.
---
 test/name-test/test-privserver-client.c |    8 ++++----
 test/name-test/test-privserver.c        |    6 +++---
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/test/name-test/test-privserver-client.c b/test/name-test/test-privserver-client.c
index 239b7bd..5af470a 100644
--- a/test/name-test/test-privserver-client.c
+++ b/test/name-test/test-privserver-client.c
@@ -46,9 +46,9 @@ open_shutdown_private_connection (dbus_bool_t use_guid)
   if (!session)
     die ("couldn't access session bus\n");
   dbus_connection_set_exit_on_disconnect (session, FALSE);
-  msg = dbus_message_new_method_call ("org.freedesktop.DBus.TestSuite.TestServer",
+  msg = dbus_message_new_method_call ("org.freedesktop.DBus.TestSuite.PrivServer",
                                       "/",
-                                      "org.freedesktop.DBus.TestSuite.TestServer",
+                                      "org.freedesktop.DBus.TestSuite.PrivServer",
                                       "GetPrivateAddress");
   if (!(reply = dbus_connection_send_with_reply_and_block (session, msg, -1, &error)))
     die ("couldn't send message: %s\n", error.message);
@@ -73,9 +73,9 @@ open_shutdown_private_connection (dbus_bool_t use_guid)
   dbus_connection_add_filter (privconn, filter_private_message, loop, NULL);
   test_connection_setup (loop, privconn);
 
-  msg = dbus_message_new_method_call ("org.freedesktop.DBus.TestSuite.TestServer",
+  msg = dbus_message_new_method_call ("org.freedesktop.DBus.TestSuite.PrivServer",
                                       "/",
-                                      "org.freedesktop.DBus.TestSuite.TestServer",
+                                      "org.freedesktop.DBus.TestSuite.PrivServer",
                                       "Quit");
   if (!dbus_connection_send (session, msg, NULL))
     die ("couldn't send Quit message\n");
diff --git a/test/name-test/test-privserver.c b/test/name-test/test-privserver.c
index 8a6efc4..c814001 100644
--- a/test/name-test/test-privserver.c
+++ b/test/name-test/test-privserver.c
@@ -37,7 +37,7 @@ filter_session_message (DBusConnection     *connection,
   TestServiceData *testdata = user_data;
 
   if (dbus_message_is_method_call (message,
-                                   "org.freedesktop.DBus.TestSuite.TestServer",
+                                   "org.freedesktop.DBus.TestSuite.PrivServer",
                                    "GetPrivateAddress"))
     {
        DBusMessage *reply;
@@ -49,7 +49,7 @@ filter_session_message (DBusConnection     *connection,
        return DBUS_HANDLER_RESULT_HANDLED;
     }
   else if (dbus_message_is_method_call (message,
-                                   "org.freedesktop.DBus.TestSuite.TestServer",
+                                   "org.freedesktop.DBus.TestSuite.PrivServer",
                                    "Quit"))
     {
       fprintf (stderr, "server exiting loop\n");
@@ -81,7 +81,7 @@ main (int argc, char *argv[])
 
   test_connection_setup (loop, session);
 
-  dbus_bus_request_name (session, "org.freedesktop.DBus.TestSuite.TestServer", 0, &error);
+  dbus_bus_request_name (session, "org.freedesktop.DBus.TestSuite.PrivServer", 0, &error);
   if (dbus_error_is_set (&error))
     die ("couldn't request name: %s", error.message);
 
-- 
1.5.4.3



More information about the dbus mailing list