From: David Herrmann Date: Wed, 29 Jul 2015 13:58:25 +0000 (+0200) Subject: sd-bus: fix encoding/decoding gvariant root container X-Git-Tag: v226.4~1^2~171 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=14204fc284cf8083286e621bb8fda4bca5bc410f;hp=14204fc284cf8083286e621bb8fda4bca5bc410f;ds=sidebyside sd-bus: fix encoding/decoding gvariant root container The gvariant root container contains a 'variant' at the end, which embeds the whole message body. This variant *must* contain a structure so we are compatible to dbus1. Otherwise, it could encode at most 1 type, instead of a full signature. Our gvariant message parser already parses the variant-content as a structure, so we're mostly good. However, it does *not* include the opening and closing parantheses, nor does it parse them. This patch fixes the decoder to verify a message contains the parantheses, and also make the encoder add those parantheses into the marshaled message. ---