Bug 5823

Summary: dbus_signature_iter_recurse fails for nested arrays
Product: dbus Reporter: Thiago Macieira <thiago>
Component: coreAssignee: Havoc Pennington <hp>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: high Keywords: patch
Version: unspecified   
Hardware: Other   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: Patch fixing the behaviour

Description Thiago Macieira 2006-02-07 01:11:15 UTC
Given the type signature "aa{sv}", the second call to 
dbus_signature_iter_recurse will set the real sub-iterator to have 
in_array=TRUE.  
 
This means that, after we get the "s", dbus_signature_iter_next returns false 
and, this, the dict_entry will have only one element. 
 
The same behaviour can be seen in any array of array where the second array 
contains a struct of more than one element or a dict entry. ("aa(iii)", for 
instance).
Comment 1 Thiago Macieira 2006-02-07 01:13:03 UTC
Created attachment 4567 [details] [review]
Patch fixing the behaviour

The attached patch fixes the problem by resetting in_array to FALSE when
creating a sub-iterator and by setting it to true when the parent (not nested)
iterator is in an array.
Comment 2 John (J5) Palmieri 2006-02-11 09:32:59 UTC
Patch looked good.  Passed make check.  Committed.  Fixed in CVS.  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.