sd_bus_message_read_array returns error -74

Lennart Poettering mzqohf at 0pointer.de
Fri Nov 5 12:58:47 UTC 2021


On Do, 04.11.21 22:04, Naseer Kalyandrug (naseer.in at gmail.com) wrote:

> Hello
>
> I am trying to read array of bytes in using the sd_bus_message_read_array
> by type 'y' , the sender also has the same format which send the array of
> bytes as 'y'
>
> However i see the read_array is failing with erro no -74
>
> Can you please some help me in understanding the error and further triage .

EBADMSG usually means that your message doesn't actually contain at
the current read index what you try to read. You can use
sd_bus_message_peek_type() to query what type should be read next.

Note that sd_bus_message_read_array() should be called *without*
entering the array container first.

Lennart

--
Lennart Poettering, Berlin


More information about the dbus mailing list