Re: sd_bus_message_read_array returns error -74

Lennart Poettering <[email protected]>
Newsgroups gmane.comp.freedesktop.dbus
Message-ID <YYUqhxWbnDfOgCRm@gardel-login>
On Do, 04.11.21 22:04, Naseer Kalyandrug ([email protected]) 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.