mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2025-12-24 20:30:07 +01:00
2004-03-12 Mikael Hallendal <micke@imendio.com>
* bus/activation.c: - Added service file reloading. Each service files directory is kept in an hash table in BusActivation and each BusActivationEntry knows what .service-file it was read from. So when you try to activate a service the bus will check if it's been updated, removed or if new .service-files has been installed. - Test code at the bottom for the service file reloading. * bus/test-main.c: (main): * bus/test.h: - added service reloading test. * dbus/dbus-sysdeps.c: * dbus/dbus-sysdeps.h: (_dbus_delete_directory): Added.
This commit is contained in:
parent
387510da64
commit
dd79fc73f0
6 changed files with 835 additions and 82 deletions
16
ChangeLog
16
ChangeLog
|
|
@ -1,3 +1,19 @@
|
|||
2004-03-12 Mikael Hallendal <micke@imendio.com>
|
||||
|
||||
* bus/activation.c:
|
||||
- Added service file reloading.
|
||||
Each service files directory is kept in an hash table in
|
||||
BusActivation and each BusActivationEntry knows what .service-file it
|
||||
was read from. So when you try to activate a service the bus will
|
||||
check if it's been updated, removed or if new .service-files has
|
||||
been installed.
|
||||
- Test code at the bottom for the service file reloading.
|
||||
* bus/test-main.c: (main):
|
||||
* bus/test.h:
|
||||
- added service reloading test.
|
||||
* dbus/dbus-sysdeps.c:
|
||||
* dbus/dbus-sysdeps.h: (_dbus_delete_directory): Added.
|
||||
|
||||
2004-03-08 Michael Meeks <michael@ximian.com>
|
||||
|
||||
* dbus/dbus-connection.c (_dbus_connection_block_for_reply):
|
||||
|
|
|
|||
858
bus/activation.c
858
bus/activation.c
File diff suppressed because it is too large
Load diff
|
|
@ -76,7 +76,7 @@ main (int argc, char **argv)
|
|||
if (!_dbus_threads_init_debug ())
|
||||
die ("initializing debug threads");
|
||||
#endif
|
||||
|
||||
|
||||
printf ("%s: Running expire list test\n", argv[0]);
|
||||
if (!bus_expire_list_test (&test_data_dir))
|
||||
die ("expire list");
|
||||
|
|
@ -106,12 +106,17 @@ main (int argc, char **argv)
|
|||
die ("sha1");
|
||||
|
||||
check_memleaks (argv[0]);
|
||||
|
||||
printf ("%s: Running message dispatch test\n", argv[0]);
|
||||
if (!bus_dispatch_test (&test_data_dir))
|
||||
if (!bus_dispatch_test (&test_data_dir))
|
||||
die ("dispatch");
|
||||
|
||||
check_memleaks (argv[0]);
|
||||
|
||||
printf ("%s: Running service files reloading test\n", argv[0]);
|
||||
if (!bus_activation_service_reload_test (&test_data_dir))
|
||||
die ("service reload");
|
||||
|
||||
check_memleaks (argv[0]);
|
||||
|
||||
printf ("%s: Success\n", argv[0]);
|
||||
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ dbus_bool_t bus_policy_test (const DBusString *test_data_d
|
|||
dbus_bool_t bus_config_parser_test (const DBusString *test_data_dir);
|
||||
dbus_bool_t bus_signals_test (const DBusString *test_data_dir);
|
||||
dbus_bool_t bus_expire_list_test (const DBusString *test_data_dir);
|
||||
dbus_bool_t bus_activation_service_reload_test (const DBusString *test_data_dir);
|
||||
dbus_bool_t bus_setup_debug_client (DBusConnection *connection);
|
||||
void bus_test_clients_foreach (BusConnectionForeachFunction function,
|
||||
void *data);
|
||||
|
|
@ -50,6 +51,7 @@ BusContext* bus_context_new_test (const DBusString *test_data_d
|
|||
const char *filename);
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* BUS_TEST_H */
|
||||
|
|
|
|||
|
|
@ -2418,6 +2418,34 @@ _dbus_create_directory (const DBusString *filename,
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes a directory; Directory must be empty
|
||||
*
|
||||
* @param filename directory filename
|
||||
* @param error initialized error object
|
||||
* @returns #TRUE on success
|
||||
*/
|
||||
dbus_bool_t
|
||||
_dbus_delete_directory (const DBusString *filename,
|
||||
DBusError *error)
|
||||
{
|
||||
const char *filename_c;
|
||||
|
||||
_DBUS_ASSERT_ERROR_IS_CLEAR (error);
|
||||
|
||||
filename_c = _dbus_string_get_const_data (filename);
|
||||
|
||||
if (rmdir (filename_c) != 0)
|
||||
{
|
||||
dbus_set_error (error, DBUS_ERROR_FAILED,
|
||||
"Failed to remove directory %s: %s\n",
|
||||
filename_c, _dbus_strerror (errno));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Appends the given filename to the given directory.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -233,6 +233,8 @@ dbus_bool_t _dbus_delete_file (const DBusString *filename,
|
|||
DBusError *error);
|
||||
dbus_bool_t _dbus_create_directory (const DBusString *filename,
|
||||
DBusError *error);
|
||||
dbus_bool_t _dbus_delete_directory (const DBusString *filename,
|
||||
DBusError *error);
|
||||
|
||||
dbus_bool_t _dbus_concat_dir_and_file (DBusString *dir,
|
||||
const DBusString *next_component);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue