Fix names of error enum values
When NM was registering all of its enum types by hand, it was using NamesLikeThis rather than the default names-like-this for the "nick" values. When we switched to using glib-mkenums, this resulted in dbus-glib using different strings for the D-Bus error names, causing compatibility problems. Fix this by using glib-mkenums annotations to manually fix all the enum values back to what they were before. (This can't be done in a more automated way, because the old names aren't 100% consistent. Eg, "UNKNOWN" frequently becomes "UnknownError" rather than just "Unknown".)
This commit is contained in:
@@ -28,10 +28,10 @@ GQuark nm_session_monitor_error_quark (void) G_GNUC_CONST;
|
||||
GType nm_session_monitor_error_get_type (void) G_GNUC_CONST;
|
||||
|
||||
typedef enum {
|
||||
NM_SESSION_MONITOR_ERROR_IO_ERROR = 0,
|
||||
NM_SESSION_MONITOR_ERROR_MALFORMED_DATABASE,
|
||||
NM_SESSION_MONITOR_ERROR_UNKNOWN_USER,
|
||||
NM_SESSION_MONITOR_ERROR_NO_DATABASE,
|
||||
NM_SESSION_MONITOR_ERROR_IO_ERROR = 0, /*< nick=IOError >*/
|
||||
NM_SESSION_MONITOR_ERROR_MALFORMED_DATABASE, /*< nick=MalformedDatabase >*/
|
||||
NM_SESSION_MONITOR_ERROR_UNKNOWN_USER, /*< nick=UnknownUser >*/
|
||||
NM_SESSION_MONITOR_ERROR_NO_DATABASE, /*< nick=NoDatabase >*/
|
||||
} NMSessionMonitorError;
|
||||
|
||||
gboolean nm_session_uid_to_user (uid_t uid, const char **out_user, GError **error);
|
||||
|
Reference in New Issue
Block a user