Created attachment 26513 [details] [review] Ensure messages are locked while marshalling. While exposing marshal() and demarshal() in the Python binding, Ben Schwartz found that the former produces messages that the latter rejects. This turns out to be because the length header is wrong. The attached patch (also available at <http://git.collabora.co.uk/?p=user/wjt/dbus.git;a=shortlog;h=refs/heads/fill-in-length-before-marshalling>) attempts to fix this by ensuring the message is locked while it's being marshalled. I haven't tested it, mind; perhaps a regression test would be a good idea.
Created attachment 26514 [details] [review] A better patch that doesn't erroneously leave the message locked Ben noticed that my original patch left the message locked if _dbus_string_init () failed. I've updated the branch accordingly.
Patch looks OK. Recommend committing it.
Applied, thanks!
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.