sd-bus: properly match ID changes
authorDavid Herrmann <dh.herrmann@gmail.com>
Thu, 16 Jul 2015 12:37:08 +0000 (14:37 +0200)
committerDavid Herrmann <dh.herrmann@gmail.com>
Thu, 16 Jul 2015 13:01:52 +0000 (15:01 +0200)
commit18458807574ec84f2bba4597ea5f8c925037d5f4
tree3afa1deeb33edd4d751f7a1006d7ffcb88864842
parent1af5f746d569f013595bb16ca113741ee306f04a
sd-bus: properly match ID changes

If the caller does not specify arg1 for NameOwnerChanged matches, we
really must take the ID from arg2 or arg3, if provided. They are
guaranteed to be identical to arg1 if either is supplied, but there is no
strict requiredment that arg1 is supplied. Hence, make sure to always
take the more restrictive match. Otherwise, we install rather wide
matches without anyone requiring them.
src/libsystemd/sd-bus/bus-control.c