ListNames and ListQueuedOwners updated to work with new kdbus
[platform/upstream/dbus.git] / bus / test.c
index e1b8a13..31ef4c8 100644 (file)
@@ -23,7 +23,7 @@
 
 #include <config.h>
 
-#ifdef DBUS_BUILD_TESTS
+#ifdef DBUS_ENABLE_EMBEDDED_TESTS
 #include "test.h"
 #include <dbus/dbus-internals.h>
 #include <dbus/dbus-list.h>
@@ -50,6 +50,13 @@ remove_client_watch (DBusWatch      *watch,
   _dbus_loop_remove_watch (client_loop, watch);
 }
 
+static void
+toggle_client_watch (DBusWatch      *watch,
+                     void           *data)
+{
+  _dbus_loop_toggle_watch (client_loop, watch);
+}
+
 static dbus_bool_t
 add_client_timeout (DBusTimeout    *timeout,
                     void           *data)
@@ -112,7 +119,7 @@ bus_setup_debug_client (DBusConnection *connection)
   if (!dbus_connection_set_watch_functions (connection,
                                             add_client_watch,
                                             remove_client_watch,
-                                            NULL,
+                                            toggle_client_watch,
                                             connection,
                                             NULL))
     goto out;
@@ -285,7 +292,7 @@ bus_context_new_test (const DBusString *test_data_dir,
     }
 
   dbus_error_init (&error);
-  context = bus_context_new (&config_file, FALSE, NULL, NULL, NULL, FALSE, &error);
+  context = bus_context_new (&config_file, BUS_CONTEXT_FLAG_NONE, NULL, NULL, NULL, &error);
   if (context == NULL)
     {
       _DBUS_ASSERT_ERROR_IS_SET (&error);