Summary: | "Could not add client names match rule" warning at startup | ||
---|---|---|---|
Product: | Telepathy | Reporter: | Guillaume Desmottes <guillaume.desmottes> |
Component: | mission-control | Assignee: | Telepathy bugs list <telepathy-bugs> |
Status: | RESOLVED FIXED | QA Contact: | Telepathy bugs list <telepathy-bugs> |
Severity: | normal | ||
Priority: | medium | CC: | guillaume.desmottes |
Version: | git master | Keywords: | patch |
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | review+ | ||
i915 platform: | i915 features: | ||
Bug Depends on: | |||
Bug Blocks: | 23486 | ||
Attachments: |
use a DEBUG instead of warning if dbus_bus_add_match failed
use a DEBUG instead of warning if dbus_bus_add_match failed |
Description
Guillaume Desmottes
2012-06-21 00:55:37 UTC
(In reply to comment #0) > (process:7800): mcd-WARNING **: Could not add client names match rule: Key > 'arg0namespace' in match rule contains junk after argument number. Only 'path' > is optionally valid ('arg0path' for example). This warning is harmless: MC falls back to adding a less optimal match rule. It will go away if you upgrade to D-Bus 1.6. Not closing the bug because if you want to downgrade the warning, that would be a reasonable thing to do. If you don't want to downgrade it, please close as NOTABUG. (MC is not suitable for running under fatal warnings anyway, which is tracked as Bug #23486.) I'll change to a debug and I think it's worth being more explicit in the debug message so naive users like me know which D-Bus version is required. Created attachment 63333 [details] [review] use a DEBUG instead of warning if dbus_bus_add_match failed Also, make the message more explicit to one can check is D-Bus version if he's wondering why it failed. I agree in principle, but: If add_match (., CLIENT_MATCH_RULE, .) fails, that just means you don't have D-Bus 1.6. If add_match (., NAME_OWNER_RULE, .) fails, that should still be a warning, or even a critical. I see two options: 1) Add a parameter "required_version" to add_match. If it's NULL, issue a warning (or even a critical): "Could not add %s match rule: %s". If it's non-NULL, issue a debug message: "Could not add %s match rule, which requires D-Bus %s: %s". 2) Flatten add_match into its caller, and do the error handling there. --- While you're in the vicinity, I notice that the boolean "arg0_filtered" makes very little sense. It's set to the return from dbus_connection_add_filter(), which is documented to mean "there was enough memory"; and in any case, if we can't add the filter, MC is not going to work correctly. So I think it should go more like this: if (!dbus_connection_add_filter (dconn, ..._filter, self, NULL)) g_critical ("Could not add filter for NameOwnerChanged (out of memory?)"); dbus_error_init (&error); if (dbus_bus_add_match (dconn, CLIENT_MATCH_RULE, &error)) { DEBUG ("..."); dbus_error_free (&error); if (!dbus_bus_add_match (dconn, NAME_OWNER_RULE, &error)) { g_critical ("..."); dbus_error_free (&error); } } (Or the equivalent with non-inlined add_match() if you prefer.) Created attachment 63689 [details] [review] use a DEBUG instead of warning if dbus_bus_add_match failed Also, make the message more explicit to one can check is D-Bus version if he's wondering why it failed. Ship it Merged to master for 5.13.0 |
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.