summaryrefslogtreecommitdiffstats
path: root/dbus/dbus-test.c
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2006-10-28 01:41:37 +0000
committerHavoc Pennington <hp@redhat.com>2006-10-28 01:41:37 +0000
commiteaefe03a8891b84e3f9e1f99f9098d65567e3092 (patch)
tree4704a6dac805f85df83593a435fb90c28e3163b9 /dbus/dbus-test.c
parentfeb7d3a0f0e2404e81fbe6252864ab599e1fa38d (diff)
2006-10-27 Havoc Pennington <hp@redhat.com>
* dbus/dbus-test.c: enclose more of the file in the DBUS_BUILD_TESTS check. * dbus/dbus-sysdeps-pthread.c (PTHREAD_CHECK): fix for DBUS_DISABLE_ASSERT case. * dbus/dbus-connection.c (dbus_connection_get_unix_user): document that it only works on the server side * dbus/dbus-bus.c: add a global lock covering the BusData we attach to each connection (internal_bus_get): lock our access to the BusData (dbus_bus_register): lock the entire registration process with _DBUS_LOCK(bus_datas). If we get the lock and registration is already complete, silently return (vs. previous behavior of aborting). (dbus_bus_set_unique_name): lock the BusData (dbus_bus_get_unique_name): lock the BusData
Diffstat (limited to 'dbus/dbus-test.c')
-rw-r--r--dbus/dbus-test.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/dbus/dbus-test.c b/dbus/dbus-test.c
index 658d2d8a..603a5092 100644
--- a/dbus/dbus-test.c
+++ b/dbus/dbus-test.c
@@ -50,8 +50,6 @@ check_memleaks (void)
}
}
-#endif /* DBUS_BUILD_TESTS */
-
typedef dbus_bool_t (*TestFunc)(void);
typedef dbus_bool_t (*TestDataFunc)(const char *data);
@@ -86,6 +84,8 @@ run_data_test (const char *test_name,
check_memleaks ();
}
+#endif /* DBUS_BUILD_TESTS */
+
/**
* An exported symbol to be run in order to execute
* unit tests. Should not be used by
@@ -179,3 +179,4 @@ dbus_internal_do_not_use_run_tests (const char *test_data_dir, const char *speci
printf ("Not compiled with unit tests, not running any\n");
#endif
}
+