Bug 5823 - dbus_signature_iter_recurse fails for nested arrays
Summary: dbus_signature_iter_recurse fails for nested arrays
Status: RESOLVED FIXED
Alias: None
Product: dbus
Classification: Unclassified
Component: core (show other bugs)
Version: unspecified
Hardware: Other Linux (All)
: high normal
Assignee: Havoc Pennington
QA Contact:
URL:
Whiteboard:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2006-02-07 01:11 UTC by Thiago Macieira
Modified: 2006-08-01 10:27 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Patch fixing the behaviour (397 bytes, patch)
2006-02-07 01:13 UTC, Thiago Macieira
Details | Splinter Review

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.