[patch] Fix open_container for structs and dict_entries

Havoc Pennington hp at redhat.com
Wed Feb 9 19:32:12 PST 2005


On Wed, 2005-02-09 at 21:36 -0500, John (J5) Palmieri wrote:
> On Wed, 2005-02-09 at 20:32, Havoc Pennington wrote:
> > On Wed, 2005-02-09 at 19:19 -0500, John (J5) Palmieri wrote:
> > > 
> > > The second problem has to do with the fact that the signature is passed
> > > to the marshaler as a dbus_string.  dbus_strings assert when being
> > > initialized with a NULL.  Since the API calls for a NULL to be passed
> > > into open_container when constructing a STRUCT or DICT_ENTRY the
> > > dbus_string asserts.  I fixed this by initializing the dbus_string to an
> > > empty string "" since the marshaler ignores this value for DICT_ENTRY
> > > and STRUCT.  However the marshaler has a comment that it may be used in
> > > the future so I am sure this is not the right fix and is only a bandaid.
> > > Any suggestions on the best way to fix this?  The patch is attached.  
> > > 
> > 
> > You should be able to just pass NULL to the DBusTypeWriter instead of a
> > DBusString*
> 
> Patch attached.  Ok to commit?
> 

Go for it, thanks.

Havoc




More information about the dbus mailing list