NetworkManager/src/settings
Dan Winship ad8b13091b libnm-core: fix up connection deserialize/copy/replace semantics
libnm-util's connection deserializing/copying/replacing functions have
odd semantics where sometimes they both modify a connection AND return
an error. libnm-core tried to improve things by guaranteeing that the
connection would not be modified if the new settings were invalid, but
this ended up breaking a bunch of places that needed to be able to
work with invalid connections. So re-fix the functions by reverting
back to the old semantics, but having return values that clearly
distinguish whether the connection was modified or not.

For comparison:

  - nm_connection_new_from_hash() / nm_simple_connection_new_from_dbus():

      - libnm-util: returns a valid connection or NULL.

      - OLD libnm-core: returned a valid connection or NULL.

      - NEW libnm-core: returns a valid connection or NULL.

  - nm_connection_duplicate() / nm_simple_connection_new_clone():

      - libnm-util: always succeeds, whether or not the connection is
        valid.

      - OLD libnm-core: returned a valid connection or NULL

      - NEW libnm-core: always succeeds, whether or not the connection
        is valid.

    - nm_connection_replace_settings_from_connection():

      - libnm-util: always replaces the settings, but returns FALSE if
        the connection is now invalid.

      - OLD libnm-core: either replaced the settings and returned TRUE
        (if the settings were valid), or else left the connection
        unchanged and returned FALSE (if not).

      - NEW libnm-core: always replaces the settings, and has no
        return value. (The modified connection is valid if and only if
        the replaced-from connection was valid; just like with the
        libnm-util version.)

    - nm_connection_replace_settings():

      - libnm-util: returns TRUE if the new settings are valid, or
        FALSE if either (a) the new settings could not be deserialized
        and the connection is unchanged, or (b) the new settings were
        deserialized, and the connection was updated, but is now not
        valid.

      - OLD libnm-core: either replaced the settings and returned TRUE
        (if the settings were valid), or else left the connection
        unchanged and returned FALSE (if not).

      - NEW libnm-core: returns TRUE if the connection was updated
        (whether or not it is valid), or FALSE if the new settings
        could not be deserialized and the connection is unchanged.
2014-09-17 08:21:21 -04:00
..
plugins ifcfg-rh: fix reading HWADDR_BLACKLIST 2014-09-10 15:00:49 +02:00
nm-agent-manager.c libnm-core: change map-of-string properties to G_TYPE_HASH_TABLE 2014-09-04 09:20:11 -04:00
nm-agent-manager.h all: fix up multiple-include-guard defines 2014-08-16 10:17:14 -04:00
nm-inotify-helper.c libnm-glib, core: use g_cclosure_marshal_generic 2013-05-08 14:59:29 -04:00
nm-inotify-helper.h settings: add note about killing inotify helper (bgo #532815) 2013-01-11 13:02:12 -06:00
nm-secret-agent.c libnm-core: rename NMConnection to/from_hash methods 2014-09-04 09:17:36 -04:00
nm-secret-agent.h all: remove a bunch of unnecessary dbus/dbus-glib includes 2014-09-03 10:45:24 -04:00
nm-settings-connection.c libnm-core: fix up connection deserialize/copy/replace semantics 2014-09-17 08:21:21 -04:00
nm-settings-connection.h libnm-core: change list-of-string and array-of-string properties to G_TYPE_STRV 2014-09-04 09:20:10 -04:00
nm-settings-error.c Use glib-mkenums to generate enum types 2012-02-15 11:42:15 -05:00
nm-settings-error.h all: fix up multiple-include-guard defines 2014-08-16 10:17:14 -04:00
nm-settings.c settings: create default wired connection from NMDeviceEthernet 2014-09-11 12:47:07 -05:00
nm-settings.h core: fill in nm-types.h, clean out other headers 2014-07-23 10:56:26 -04:00
nm-system-config-interface.c core: fill in nm-types.h, clean out other headers 2014-07-23 10:56:26 -04:00
nm-system-config-interface.h all: fix up multiple-include-guard defines 2014-08-16 10:17:14 -04:00