Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(168)

Issue 6820045: dbus-c++: MessageIter: handle nested dicts in copy_data (Closed)

Created:
9 years, 8 months ago by Vince Laviano
Modified:
9 years ago
Reviewers:
Jason Glasgow
CC:
chromium-os-reviews_chromium.org
Visibility:
Public.

Description

MessageIter: handle nested dicts in copy_data MessageIter::copy_data is calling dbus_message_iter_open_container (in libdbus) with an invalid |contained_signature| argument when |type| is complex. This triggers an assertion failure when the args are checked. The comments for dbus_message_iter_open_container say: "For variants, the contained_signature should be the type of the single value inside the variant. For structs and dict entries, contained_signature should be NULL; it will be set to whatever types you write into the struct. For arrays, contained_signature should be the type of the array elements." However, the existing code only follows this guideline for arrays. It does the opposite of what is specified (passing NULL when a type signature string is required and vice versa) for variants, structs, and dict entries. This issue was identified and this fix proposed in the upstream issue tracker (see http://sourceforge.net/tracker/?func=detail&aid=3151818&group_id=236997&atid=1101682), but the fix has not yet been applied upstream and the issue remains open. This issue was causing cashewd to abort when making a GetProperties D-Bus call to flimflam's Device interface because of the nesting in the newly added Cellular.SIMLockStatus property (see issue 11293). BUG=chromium-os:13850 TEST=manual testing on device Change-Id: Ia29dc64dd9f7627413fc1c1f1fbf8d516336447c Committed: http://chrome-svn/viewvc/chromeos?view=rev&revision=32fe2ce

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -1 line) Patch
M src/message.cpp View 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 2 (0 generated)
Vince Laviano
9 years, 8 months ago (2011-04-11 19:03:46 UTC) #1
Jason Glasgow
9 years, 8 months ago (2011-04-11 19:05:34 UTC) #2
LGTM

Powered by Google App Engine
This is Rietveld 408576698