Re: [PATCH] dbus error enum fixes

On Fri, 2012-03-09 at 09:53 -0500, Dan Winship wrote:
> I'm not sure I got the description of the problem right in the commit
> message...
> This fixes all of the enums that had been manually registered
> pre-glib-mkenums to have the same values now as they did then. It also
> fixes a few new enum types (bond and vlan stuff) to use the same
> conventions. It doesn't change non-GError enum types, and it doesn't
> change NMDnsManagerError or NMNetlinkMonitorError, because they weren't
> registered before, and so presumably aren't being sent across D-Bus.

Looks good, thanks.  Small typo in description: NamesListThis should be
NamesLikeThis.  A slightly more in-depth problem description would be
something like:

When dbus-glib creates the D-Bus error name it uses the GLib enum
nickname converted to StudlyCaps if not already in that form.
Previously NM manually specified the enum nickname and thus dbus-glib
simply used the NM-provided value as the D-Bus error name.  But when
auto-generating the error enums, the default nickname format used by
glib-mkenums is "error-nick-name" which is converted by dbus-glib to
StudlyCaps.  However, due to backwards compatibility, dbus-glib does not
upper-case the first character, and thus got NM's D-Bus error names
wrong.  So NM must still manually specify the GLib enum nicknames to
ensure we don't break the D-Bus API.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]