D-Bus session bus is strangely closing my connection
Thiago Macieira
thiago at kde.org
Sun Mar 18 06:02:48 PDT 2007
Kristoffer Lundén wrote:
>The calls are identical, byte for byte
No, they are not.
If you put them side by side, you'll notice that the Ruby program is
sending an invalid message. The a{sv} argument of the call is being
marshalled by Python as '\0\0\0\0' (empty), while Ruby is
sending '\4\0\0\0\0\0\0\0' (4 bytes of data).
And 4 bytes cannot contain one {sv}: the minimum acceptable would be the
string's length (4 bytes), the terninating NUL for the string, one byte
to encode the length for the variant's signature, the signature's one
byte followed by a NUL and a single element of type BYTE.
So the Ruby message was invalid.
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/dbus/attachments/20070318/17162074/attachment.pgp
More information about the dbus
mailing list