dbus_message_demarshal() and partial messages

Avery Pennarun apenwarr at gmail.com
Tue Aug 14 17:51:51 PDT 2007


On 14/08/07, Thiago Macieira <thiago at kde.org> wrote:
> I'd rather not return DBUS_MINIMUM_HEADER_SIZE because it could indicate
> that that's EXACTLY the number of bytes wanted when it clearly isn't.
>
> But, seeing that that symbol is public, we can probably say that if you
> don't have DBUS_MINIMUM_HEADER_SIZE bytes available, you shouldn't be
> calling the bytes_needed function. So I'd return -1 and make that an
> error (probably one of those assertions "you're not using this function
> properly").

That works for me, as long as DBUS_MINIMUM_HEADER_SIZE remains public.

Have fun,

Avery


More information about the dbus mailing list