Serial number details in specification

David Rheinsberg david.rheinsberg at gmail.com
Fri May 10 11:28:01 UTC 2019


Hi

On Fri, May 10, 2019 at 1:21 PM Thomas Kluyver <thomas at kluyver.me.uk> wrote:
>
> On Fri, May 10, 2019, at 12:16 PM, David Rheinsberg wrote:
> > The bus uses the serial number to track "reply-slots", meaning a
> > pending method-call is tracked by its sender+destination+serialnumber
> > combination, and this is used to match the corresponding reply.
>
> Out of interest, why does the bus need to match replies to requests? I thought it just sent both method calls and replies to the destination specified in the headers, without matching them up.

In theory, yes. However, the bus-policy allows matching on "expected
replies". This means, depending on whether a reply is to a pending
method call, or stray, you can match on it and apply a different
policy.
In practice, this technique is used to reject any stray replies.
Meaning, only replies to pending method-calls are actually
transmitted. Everything else is rejected and dropped.

Thanks
David


More information about the dbus mailing list