Re: Serial number details in specification

David Rheinsberg <[email protected]>
Newsgroups gmane.comp.freedesktop.dbus
Message-ID <CADyDSO4dWhNUouax9LZeAeM_=8y-+zHBMizdY3gfSJ8+yjVd6g@mail.gmail.com>
Hi

On Fri, May 10, 2019 at 1:21 PM Thomas Kluyver <[email protected]> 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
_______________________________________________
dbus mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dbus
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.