summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* bus: Show the errno if inotify cannot be initializedbus-inotify-error-handlingSimon McVittie2021-12-101-1/+1
| | | | | | This will hopefully help to indicate why. Signed-off-by: Simon McVittie <smcv@collabora.com>
* bus: Correct check for inotify_init() failureSimon McVittie2021-12-101-1/+1
| | | | | | | | | | fd 0 is a valid fd - although if we get stdin as our inotify fd, something is weird somewhere. For the dbus-daemon, in practice this should never happen, because we use _dbus_ensure_standard_fds() to make sure stdin is already open. For unit tests, it could in theory be the case that stdin is closed. Signed-off-by: Simon McVittie <smcv@collabora.com>
* Merge branch 'fix-issue-362' into 'master'Simon McVittie2021-12-101-2/+62
|\ | | | | | | | | | | | | Fix `test applications do not display invalid test selection` Closes #362 See merge request dbus/dbus!233
| * In _dbus_test_main() check if a specified test name is availableRalf Habacker2021-12-101-0/+23
| | | | | | | | Fixes #362
| * test/test-utils.c: Add command line option --list-tests to test applicationsRalf Habacker2021-12-101-0/+16
| | | | | | | | | | With this command line option a list of available tests is printed to stdout.
| * test/test-utils.c: Add command line option --help to test applicationsRalf Habacker2021-12-101-2/+23
|/
* Merge branch 'fix-issue-360' into 'master'Simon McVittie2021-12-091-7/+13
|\ | | | | | | | | | | | | Fix test-bus related memory leaks on Windows Closes #360 See merge request dbus/dbus!232
| * Avoid assertation in bus_activation_reload()Ralf Habacker2021-12-091-7/+13
|/ | | | | | | | In the mentioned function a local DBusError instance is now used to fulfill the requirement of dbus_error_has_name() that the parameter 'error' must not be null. See #360
* Fix memory leaks in Windows variant of _dbus_directory_open()Ralf Habacker2021-12-092-5/+14
| | | | | | | | If the memory is not sufficient, the created DBusString instance must be released. This belongs to the mentioned function and _dbus_string_init_from_string(). Fixes #360
* Merge branch 'fix-test-dbus-daemon-windows' into 'master'Simon McVittie2021-12-071-0/+2
|\ | | | | | | | | | | | | tools/ci-build.sh: Double maximum test time when running tests on Windows Closes #320 and #359 See merge request dbus/dbus!231
| * tools/ci-build.sh: Double maximum test time when running tests on WindowsRalf Habacker2021-12-061-0/+2
|/ | | | | | | The currently timeout of 60 seconds is too short for test-dbus-daemon on Windows, depending on the load of the CI system. Fixes #359
* Merge branch 'fix-issue-357' into 'master'Simon McVittie2021-12-062-26/+33
|\ | | | | | | | | | | | | test-spawn-oom: Fix regression with recent Windows refactoring Closes #357 and #279 See merge request dbus/dbus!228
| * Add returning oom error in _dbus_spawn_program() when building for WINCERalf Habacker2021-12-061-0/+1
| |
| * Adjust _dbus_spawn_async_with_babysitter() on Windows to follow Unix like ↵Ralf Habacker2021-12-061-6/+20
| | | | | | | | | | | | | | OOM behavior That way, the spawn-oom unit test could expect OOM on Windows to behave the same as OOM on Unix, raising DBUS_ERROR_NO_MEMORY.
| * _dbus_decrement_fail_alloc_counter(): Enable out of memory testing on WindowsRalf Habacker2021-12-061-12/+0
| |
| * Fix memory leak in protect_argv() in case of memory shortageRalf Habacker2021-12-061-2/+4
| |
| * protect_argv(): Only set return variable in success caseRalf Habacker2021-12-061-6/+8
|/ | | | This avoids overwriting the variable even if there is no result.
* Merge branch 'windows-error-oom' into 'master'Ralf Habacker2021-12-061-1/+7
|\ | | | | | | | | _dbus_win_set_error_from_last_error: Always set the error See merge request dbus/dbus!229
| * _dbus_win_set_error_from_last_error: Always set the errorSimon McVittie2021-12-031-1/+7
|/ | | | | | | | | If we run out of memory while setting an error, we need to recover by setting the error to "out of memory" instead of the original error. Otherwise, the error indicator would be unset, breaking the rules of our error model. Signed-off-by: Simon McVittie <smcv@collabora.com>
* Fix gcc compile error: redundant redeclaration of ‘environ’ ↵Ralf Habacker2021-11-301-0/+5
| | | | | | [-Werror=redundant-decls] Cherry picked from dbus/dbus!227
* Merge branch 'issue-355' into 'master'Ralf Habacker2021-11-303-1/+5
|\ | | | | | | | | | | | | Fix MinGW build error Closes #355 See merge request dbus/dbus!226
| * Fix MinGW build error: cast between incompatible function types from ↵Ralf Habacker2021-11-291-1/+1
| | | | | | | | | | | | | | | | 'FARPROC' [-Werror=cast-function-type]' The build error occurred in 'dbus/dbus-sysdeps-win.c:129:43: Fixes #355
| * tools/ci-*.sh: Show used command line for CI build scriptsRalf Habacker2021-11-292-0/+4
|/ | | | | This makes it much easier to determine the command line used for the purpose of reproducing the build.
* Merge branch 'dbus-run-session-refactor' into 'master'Simon McVittie2021-11-295-76/+145
|\ | | | | | | | | _dbus_spawn_program(): Add additional parameter to return error See merge request dbus/dbus!223
| * dbus-spawn-win.c: Refactoring compose_string() and related functions to use ↵Ralf Habacker2021-11-293-59/+112
| | | | | | | | | | | | | | DBusString Since the code to compose strings is already used multiple times the refactoring results in a new function _dbus_string_append_strings().
| * _dbus_spawn_program(): Add additional parameter to return errorRalf Habacker2021-11-293-15/+31
| | | | | | | | | | | | | | | | By specifying an error instance via the additional parameter, errors that occur in it are transported to the caller in a coordinated manner. This eliminates the need to query GetLastError() outside the function, which can return an incorrect value if the implementation changes.
| * _dbus_spawn_program() now returns #NULL for unification in case of errorRalf Habacker2021-11-292-5/+5
| |
| * Add _DBUS_GNUC_PRINTF annotation to _dbus_win_set_error_from_last_error()Ralf Habacker2021-11-291-1/+1
|/ | | | This makes printf like format string related issues visible.
* Remove `build:` prefix from jobs to make labels more visible in pipeline pageRalf Habacker2021-11-291-11/+11
| | | | | | | The length if the displayed jobs is limited on the gitlab CI pipeline page and is occupied partly be the prefix. Cherry-picked from dbus/dbus/!192
* Merge branch 'master' into 'master'Simon McVittie2021-11-261-5/+16
|\ | | | | | | | | autotools: use pkg-config instead of AC_PATH_XTRA See merge request dbus/dbus!212
| * autotools: use pkg-config instead of AC_PATH_XTRASCOTT-HAMILTON2021-11-261-5/+16
|/
* Merge branch 'issue-354' into 'master'Simon McVittie2021-11-251-2/+33
|\ | | | | | | | | | | | | dbus-run-session: also catches a server-exit under Windows Closes #354 See merge request dbus/dbus!225
| * dbus-run-session: also catches a server-exit under WindowsRalf Habacker2021-11-251-2/+33
|/ | | | | | | If the dbus-daemon fails before the --ready-event-handle is signalled, then dbus-run-session now detects that, and exit unsuccessfully. Fixes #354
* Fix printf format string in _dbus_win_event_create_inheritable()Ralf Habacker2021-11-251-1/+1
| | | | Fixup for commit 3f7c36f4.
* Merge branch 'clarify-doc-win-code' into 'master'Ralf Habacker2021-11-241-1/+1
|\ | | | | | | | | | | | | Clarify NULL vs. INVALID_HANDLE_VALUE in _dbus_win_event_free() Closes #352 See merge request dbus/dbus!224
| * Clarify NULL vs. INVALID_HANDLE_VALUE in _dbus_win_event_free()Ralf Habacker2021-11-241-1/+1
|/ | | | Fixes dbus/dbus#352
* Merge branch 'dbus-run-session-add-delay' into 'master'Simon McVittie2021-11-2314-33/+314
|\ | | | | | | | | | | | | tools/dbus-run-session: fix race between manual and automatically started dbus-daemon on Windows Closes #297 See merge request dbus/dbus!195
| * tools/dbus-run-session.c: use _dbus_win_set_error_from_last_error() on ↵Ralf Habacker2021-11-233-18/+2
| | | | | | | | | | | | | | remaining locations The previously used function _dbus_win_stderr_win_error() has been removed because it is no longer used.
| * tools/dbus-run-session: fix race between manual and automatically started ↵Ralf Habacker2021-11-2312-14/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dbus-daemon on Windows dbus-run-session starts a dbus-daemon before the client application. We must avoid letting the application try to connect before the dbus-daemon's DBusServer is listening for connections. In the Unix implementation, we already achieved this via the --print-address option. If the client tried to connect too soon, the server would not yet be listening and the client would fail. In the Windows implementation, we communicate the bus address to the client application as an autolaunch: address, so if the client tried to connect too soon, it would autolaunch a new dbus-daemon instead of using the one that it was intended to use. We can avoid this by using a new option to pass in a Windows event object, which will be set when the server has started and is ready to process connections. Fixes #297
| * dbus-sysdeps-win.c: Add helper functions to handle events on WindowsRalf Habacker2021-11-232-1/+184
|/ | | | These functions are in the dbus library to be used everywhere
* Merge branch 'remove-nonexistent-match' into 'master'Simon McVittie2021-11-224-50/+204
|\ | | | | | | | | bus: Don't return success from RemoveMatch if there was no such match-rule See merge request dbus/dbus!222
| * test: Exercise successful and failed RemoveMatch callsSimon McVittie2021-11-221-21/+144
| | | | | | | | | | Reproduces: https://gitlab.freedesktop.org/dbus/dbus/-/issues/351 Signed-off-by: Simon McVittie <smcv@collabora.com>
| * bus: Separate RemoveMatch into prepare and commit stagesSimon McVittie2021-11-223-29/+60
|/ | | | | | | This means we don't send a spurious successful reply if a caller removes a match rule that they never added. Signed-off-by: Simon McVittie <smcv@collabora.com>
* Merge branch 'cleanup-autolaunch-win' into 'master'Simon McVittie2021-11-192-72/+85
|\ | | | | | | | | dbus-sysdeps-win.c: corrections of indentations and minor refactoring See merge request dbus/dbus!221
| * dbus/dbus-sysdeps-win.c: Convert the character buffer 'dbus_args' to a ↵Ralf Habacker2021-11-191-3/+16
| | | | | | | | | | | | DBusString instance This is necessary to avoid possible stack overflows.
| * dbus/dbus-sysdeps-*win.c: correct indentation when calling functionsRalf Habacker2021-11-192-54/+54
| | | | | | | | The normal style is <function-name><space>(<no-spaces>...<no-spaces>).
| * dbus/dbus-sysdeps-win.c: correction of indentations in ↵Ralf Habacker2021-11-191-17/+17
|/ | | | _dbus_get_autolaunch_address ()
* Merge branch 'cmake-fix-include-path' into 'master'Ralf Habacker2021-11-182-5/+4
|\ | | | | | | | | | | | | cmake: In generated cmake support files get value for DBus1_INCLUDE_DIRS from related cmake target Closes #346 See merge request dbus/dbus!214
| * cmake: In generated cmake support files get value for DBus1_INCLUDE_DIRS ↵Ralf Habacker2021-11-182-5/+4
|/ | | | | | | | variable from related cmake target This allows cmake to construct the resulting (relocatable) runtime paths. Fixes dbus/dbus#346
* Merge branch 'master' into 'master'Ralf Habacker2021-11-181-0/+1
|\ | | | | | | | | CMake: Set IMPORTED_IMPLIB property See merge request dbus/dbus!172