diff options
author | Ralf Habacker <ralf.habacker@freenet.de> | 2010-12-29 12:31:42 +0100 |
---|---|---|
committer | Ralf Habacker <ralf.habacker@freenet.de> | 2010-12-29 14:43:24 +0100 |
commit | 02d973686a7dff06bb5868906a392c4c55e5ac84 (patch) | |
tree | 674d393da25e43e5b96992d85a65ae99b1116472 /bus | |
parent | 79026cee36e549a94e1157083ab84e061b72d3f0 (diff) |
Use absolute session service dir path in bus-test on windows.
Diffstat (limited to 'bus')
-rw-r--r-- | bus/config-parser.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/bus/config-parser.c b/bus/config-parser.c index 2d19f2b9..f128b91d 100644 --- a/bus/config-parser.c +++ b/bus/config-parser.c @@ -30,6 +30,7 @@ #include "selinux.h" #include <dbus/dbus-list.h> #include <dbus/dbus-internals.h> +#include <dbus/dbus-sysdeps.h> #include <string.h> typedef enum @@ -3243,13 +3244,13 @@ static const char *test_session_service_dir_matches[] = #ifdef DBUS_UNIX "/testusr/testlocal/testshare/dbus-1/services", "/testusr/testshare/dbus-1/services", -#endif DBUS_DATADIR"/dbus-1/services", -#ifdef DBUS_UNIX "/testhome/foo/.testlocal/testshare/dbus-1/services", #endif +/* will be filled in test_default_session_servicedirs() */ #ifdef DBUS_WIN NULL, + NULL, #endif NULL }; @@ -3263,6 +3264,16 @@ test_default_session_servicedirs (void) const char *common_progs; int i; +#ifdef DBUS_WIN + char buffer[1024]; + if (_dbus_get_install_root(buffer, sizeof(buffer))) + { + strcat(buffer,DBUS_DATADIR); + strcat(buffer,"/dbus-1/services"); + test_session_service_dir_matches[0] = buffer; + } +#endif + /* On Unix we don't actually use this variable, but it's easier to handle the * deallocation if we always allocate it, whether needed or not */ if (!_dbus_string_init (&progs)) |