Summary: | dbus-monitor is closed when ping is sent | ||
---|---|---|---|
Product: | dbus | Reporter: | Ondrej Holy <oholy> |
Component: | core | Assignee: | Simon McVittie <smcv> |
Status: | RESOLVED FIXED | QA Contact: | D-Bus Maintainers <dbus> |
Severity: | normal | ||
Priority: | medium | CC: | bugzilla, walters |
Version: | unspecified | Keywords: | patch |
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | review? | ||
i915 platform: | i915 features: | ||
Attachments: |
dbus-monitor: disable automatic handling of o.fd.Peer messages
Add test-case to confirm that dbus_connection_set_route_peer_messages() is enough |
Description
Ondrej Holy
2015-06-12 08:50:10 UTC
This seems very likely to be a regression in 1.9.x. dbus-monitor should turn off the part of libdbus that "helpfully" handles Peer messages automatically. Calling dbus_connection_set_route_peer_messages (conn, TRUE) in dbus-monitor is probably enough. That stops it from trying to reply to any Peer message that has a destination; and dbus-daemon should never send us a Peer message not fitting that description. Created attachment 116916 [details] [review] dbus-monitor: disable automatic handling of o.fd.Peer messages A normal DBusConnection will automatically reply to o.fd.Peer messages such as Ping. We don't want this: if we are using traditional eavesdropping with an older dbus-daemon, we'll confuse everyone else by replying to messages that weren't intended for us. If we are using the new Monitoring interface (since 1.9.12), the same still applies, but in addition, the dbus-daemon will disconnect us for not being a well-behaved monitor. Created attachment 116917 [details] [review] Add test-case to confirm that dbus_connection_set_route_peer_messages() is enough Comment on attachment 116916 [details] [review] dbus-monitor: disable automatic handling of o.fd.Peer messages Review of attachment 116916 [details] [review]: ----------------------------------------------------------------- ++ Comment on attachment 116917 [details] [review] Add test-case to confirm that dbus_connection_set_route_peer_messages() is enough Review of attachment 116917 [details] [review]: ----------------------------------------------------------------- ++, although the commit summary is a bit opaque if you haven’t read the bug. (In reply to Philip Withnall from comment #6) > ++, although the commit summary is a bit opaque if you haven’t read the bug. Re-worded it and pushed. Fixed in git for 1.9.18 and 1.8.20. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.