Skip to content

gdbusconnection: Disallow subscribers for implicit match rules

Ray Strode requested to merge add-back-compat-match-rule-ordering into main

While it's true that GDBus makes no ordering guarantees about the order of callbacks for signals subscriptions for the same signal, it's still a good idea not to change the order if we don't have to.

Since g_dbus_connection_signal_subscribe started tracking name owners itself, the order of NameOwnerChanged handlers can change counterintuitively because that tracking creates a match rule implicitly, that future subscribers can use for their subscriptions.

This commit just adds a minor change to the syntax for those implicit match rules, so explicit match rules will always be treated distinctly. The change is to add a leading "*" to the match rule that later gets filtered out when sending the match rule to the bus.

Merge request reports