[WRAPPER] Fix dbus callback return type and format string bugs#3634
Merged
ptitSeb merged 1 commit intoptitSeb:mainfrom Mar 9, 2026
Merged
[WRAPPER] Fix dbus callback return type and format string bugs#3634ptitSeb merged 1 commit intoptitSeb:mainfrom
ptitSeb merged 1 commit intoptitSeb:mainfrom
Conversation
Fix DBusObjectPathMessageFunction callback returning void instead of DBusHandlerResult (int). The native dbus library expects an int return value from this callback to determine message handling disposition. Returning void causes dbus to read an indeterminate value from the return register, which can lead to incorrect message dispatch behavior. Also fix DBusNewConnectionFunction RunFunctionFmt format string using "pppp" (4 args) when only 3 arguments are passed. The correct format is "ppp" matching the 3-parameter DBusNewConnectionFunction signature: (DBusServer*, DBusConnection*, void*). Both fixes applied to wrapped/ and wrapped32/ variants. Should help ptitSeb#3632 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Owner
|
Yep, thisis a fair use of AI here. Nice find. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
DBusObjectPathMessageFunctioncallback bridge returningvoidinstead ofDBusHandlerResult(int). The native dbus library reads the return register to determine message handling disposition (DBUS_HANDLER_RESULT_HANDLED,NOT_YET_HANDLED, etc.), so returning void causes indeterminate behavior.DBusNewConnectionFunctionRunFunctionFmtformat string using"pppp"(4 args) when only 3 arguments are passed. Correct signature isvoid (*)(DBusServer*, DBusConnection*, void*)— 3 pointer args.src/wrapped/wrappeddbus.candsrc/wrapped32/wrappeddbus.c.Verified callback signatures against dbus API docs:
DBusObjectPathMessageFunctionreturnsDBusHandlerResult(line 380)DBusNewConnectionFunctiontakes 3 params (server, new_connection, data)Should help #3632
AI Disclosure
AI (Claude) was used to assist with identifying the callback signature mismatches and generating the wrapper corrections, per CONTRIBUTING.md guidelines for wrapper callback handling. All changes were manually reviewed and verified against the dbus API documentation.
🤖 Generated with Claude Code