Bug 23215

Summary: Document that serial must be non-zero, and give more useful errors from dbus_message_demarshal()
Product: dbus Reporter: Will Thompson <will>
Component: coreAssignee: Havoc Pennington <hp>
Status: RESOLVED FIXED QA Contact: John (J5) Palmieri <johnp>
Severity: normal    
Priority: medium CC: walters
Version: unspecified   
Hardware: Other   
OS: All   
URL: http://git.collabora.co.uk/?p=user/wjt/dbus.git;a=shortlog;h=refs/heads/zero-serial
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 19723    

Description Will Thompson 2009-08-08 06:38:41 UTC
I was looking into #19723, where libdbus refuses to deserialize a message it just serialized. It turned out to be because the message's serial was zero. The spec doesn't document this requirement; I think it should.

The branch at <http://git.collabora.co.uk/?p=user/wjt/dbus.git;a=shortlog;h=refs/heads/zero-serial> documents this in the definition of the header, and includes what exactly was invalid in the error returned by _demarshal().
Comment 1 Will Thompson 2009-08-08 16:10:16 UTC
On #19723, Ben has suggested that it'd be better if dbus_message_demarshal() could accept messages with a 0 serial, and have only the daemon reject them. I think that would be okay too.
Comment 2 Colin Walters 2009-10-16 12:11:07 UTC
All 3 of the patches there look fine to me, feel free to push.  (In the future though I'd prefer bugzilla attachments).
Comment 3 Will Thompson 2009-11-01 06:35:18 UTC
(In reply to comment #2)
> All 3 of the patches there look fine to me, feel free to push.

I don't have commit access, I'm afraid.
Comment 4 Will Thompson 2009-11-05 02:39:07 UTC
Merged, thanks for the review.

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.