NetworkManager/libnm-core
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
..
tests libnm-core: fix up connection deserialize/copy/replace semantics 2014-09-17 08:21:21 -04:00
crypto.c libnm-core: replace GByteArray with pointer + length in some APIs 2014-09-04 09:20:11 -04:00
crypto.h libnm-core: replace GByteArray with pointer + length in some APIs 2014-09-04 09:20:11 -04:00
crypto_gnutls.c libnm-core: replace GByteArray with pointer + length in some APIs 2014-09-04 09:20:11 -04:00
crypto_nss.c libnm-core: replace GByteArray with pointer + length in some APIs 2014-09-04 09:20:11 -04:00
Makefile.am libnm: add NetworkManager.h, disallow including individual headers 2014-08-01 14:34:40 -04:00
Makefile.libnm-core libnm-core: drop NMParamSpecSpecialized, add nm_property_compare() 2014-09-04 09:20:10 -04:00
nm-connection.c libnm-core: fix up connection deserialize/copy/replace semantics 2014-09-17 08:21:21 -04:00
nm-connection.h libnm-core: fix up connection deserialize/copy/replace semantics 2014-09-17 08:21:21 -04:00
nm-core-internal.h libnm: drop NM_TYPE_OBJECT_ARRAY, use G_TYPE_PTR_ARRAY 2014-09-04 09:21:04 -04:00
nm-dbus-interface.h all: fix up multiple-include-guard defines 2014-08-16 10:17:14 -04:00
nm-property-compare.c libnm-core: drop NMParamSpecSpecialized, add nm_property_compare() 2014-09-04 09:20:10 -04:00
nm-property-compare.h libnm-core: drop NMParamSpecSpecialized, add nm_property_compare() 2014-09-04 09:20:10 -04:00
nm-setting-8021x.c libnm-core: change DBUS_TYPE_G_UCHAR_ARRAY properties to G_TYPE_BYTES 2014-09-04 09:20:11 -04:00
nm-setting-8021x.h libnm-core: change DBUS_TYPE_G_UCHAR_ARRAY properties to G_TYPE_BYTES 2014-09-04 09:20:11 -04:00
nm-setting-adsl.c libnm-core: simplify _nm_register_setting(), register error types too 2014-09-04 09:18:44 -04:00
nm-setting-adsl.h all: fix up multiple-include-guard defines 2014-08-16 10:17:14 -04:00
nm-setting-bluetooth.c libnm-core: change all mac-address properties to G_TYPE_STRING 2014-09-04 09:20:10 -04:00
nm-setting-bluetooth.h libnm-core: change all mac-address properties to G_TYPE_STRING 2014-09-04 09:20:10 -04:00
nm-setting-bond.c libnm-core: drop the ability to verify settings from property overrides 2014-09-17 08:21:21 -04:00
nm-setting-bond.h libnm-core: drop :interface-name properties on virtual NMSetting types 2014-09-04 09:18:44 -04:00
nm-setting-bridge-port.c libnm-core: simplify _nm_register_setting(), register error types too 2014-09-04 09:18:44 -04:00
nm-setting-bridge-port.h all: fix up multiple-include-guard defines 2014-08-16 10:17:14 -04:00
nm-setting-bridge.c libnm-core: drop the ability to verify settings from property overrides 2014-09-17 08:21:21 -04:00
nm-setting-bridge.h libnm-core: change all mac-address properties to G_TYPE_STRING 2014-09-04 09:20:10 -04:00
nm-setting-cdma.c libnm-core: simplify _nm_register_setting(), register error types too 2014-09-04 09:18:44 -04:00
nm-setting-cdma.h all: fix up multiple-include-guard defines 2014-08-16 10:17:14 -04:00
nm-setting-connection.c libnm-core: drop the ability to verify settings from property overrides 2014-09-17 08:21:21 -04:00
nm-setting-connection.h libnm-core: normalize slave-type and slave-settings of connections 2014-08-22 15:24:31 +02:00
nm-setting-dcb.c libnm-core: fix DCB's _nm_setting_dcb_uint_array_from_dbus() 2014-09-08 17:56:51 +02:00
nm-setting-dcb.h all: fix up multiple-include-guard defines 2014-08-16 10:17:14 -04:00
nm-setting-generic.c libnm-core: simplify _nm_register_setting(), register error types too 2014-09-04 09:18:44 -04:00
nm-setting-generic.h all: fix up multiple-include-guard defines 2014-08-16 10:17:14 -04:00
nm-setting-gsm.c libnm-core: simplify _nm_register_setting(), register error types too 2014-09-04 09:18:44 -04:00
nm-setting-gsm.h libnm-core: drop previously-deprecated NMSetting properties 2014-09-04 09:17:37 -04:00
nm-setting-infiniband.c libnm-core: change all mac-address properties to G_TYPE_STRING 2014-09-04 09:20:10 -04:00
nm-setting-infiniband.h libnm-core: change all mac-address properties to G_TYPE_STRING 2014-09-04 09:20:10 -04:00
nm-setting-ip4-config.c libnm-core: improve NMSettingIP4Config / NMSettingIP6Config property types 2014-09-04 09:20:11 -04:00
nm-setting-ip4-config.h libnm-core: improve NMSettingIP4Config / NMSettingIP6Config property types 2014-09-04 09:20:11 -04:00
nm-setting-ip6-config.c libnm-core: improve NMSettingIP4Config / NMSettingIP6Config property types 2014-09-04 09:20:11 -04:00
nm-setting-ip6-config.h libnm-core: improve NMSettingIP4Config / NMSettingIP6Config property types 2014-09-04 09:20:11 -04:00
nm-setting-olpc-mesh.c libnm-core: change DBUS_TYPE_G_UCHAR_ARRAY properties to G_TYPE_BYTES 2014-09-04 09:20:11 -04:00
nm-setting-olpc-mesh.h libnm-core: change DBUS_TYPE_G_UCHAR_ARRAY properties to G_TYPE_BYTES 2014-09-04 09:20:11 -04:00
nm-setting-ppp.c libnm-core: simplify _nm_register_setting(), register error types too 2014-09-04 09:18:44 -04:00
nm-setting-ppp.h all: fix up multiple-include-guard defines 2014-08-16 10:17:14 -04:00
nm-setting-pppoe.c libnm-core: simplify _nm_register_setting(), register error types too 2014-09-04 09:18:44 -04:00
nm-setting-pppoe.h all: fix up multiple-include-guard defines 2014-08-16 10:17:14 -04:00
nm-setting-private.h libnm-core: drop the ability to verify settings from property overrides 2014-09-17 08:21:21 -04:00
nm-setting-serial.c libnm-core: simplify _nm_register_setting(), register error types too 2014-09-04 09:18:44 -04:00
nm-setting-serial.h all: fix up multiple-include-guard defines 2014-08-16 10:17:14 -04:00
nm-setting-team-port.c libnm-core: simplify _nm_register_setting(), register error types too 2014-09-04 09:18:44 -04:00
nm-setting-team-port.h all: fix up multiple-include-guard defines 2014-08-16 10:17:14 -04:00
nm-setting-team.c libnm-core: drop the ability to verify settings from property overrides 2014-09-17 08:21:21 -04:00
nm-setting-team.h libnm-core: drop :interface-name properties on virtual NMSetting types 2014-09-04 09:18:44 -04:00
nm-setting-vlan.c libnm-core: drop the ability to verify settings from property overrides 2014-09-17 08:21:21 -04:00
nm-setting-vlan.h libnm-core: drop :interface-name properties on virtual NMSetting types 2014-09-04 09:18:44 -04:00
nm-setting-vpn.c libnm-core: change map-of-string properties to G_TYPE_HASH_TABLE 2014-09-04 09:20:11 -04:00
nm-setting-vpn.h all: fix up multiple-include-guard defines 2014-08-16 10:17:14 -04:00
nm-setting-wimax.c libnm-core: change all mac-address properties to G_TYPE_STRING 2014-09-04 09:20:10 -04:00
nm-setting-wimax.h libnm-core: change all mac-address properties to G_TYPE_STRING 2014-09-04 09:20:10 -04:00
nm-setting-wired.c libnm-core: change map-of-string properties to G_TYPE_HASH_TABLE 2014-09-04 09:20:11 -04:00
nm-setting-wired.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-setting-wireless-security.c libnm-core: change list-of-string and array-of-string properties to G_TYPE_STRV 2014-09-04 09:20:10 -04:00
nm-setting-wireless-security.h all: fix up multiple-include-guard defines 2014-08-16 10:17:14 -04:00
nm-setting-wireless.c libnm-core: change DBUS_TYPE_G_UCHAR_ARRAY properties to G_TYPE_BYTES 2014-09-04 09:20:11 -04:00
nm-setting-wireless.h libnm-core: change DBUS_TYPE_G_UCHAR_ARRAY properties to G_TYPE_BYTES 2014-09-04 09:20:11 -04:00
nm-setting.c libnm-core: drop the ability to verify settings from property overrides 2014-09-17 08:21:21 -04:00
nm-setting.h libnm-core: drop nm_{setting,connection}_get_virtual_iface_name() 2014-09-04 09:18:43 -04:00
nm-simple-connection.c libnm-core: fix up connection deserialize/copy/replace semantics 2014-09-17 08:21:21 -04:00
nm-simple-connection.h libnm-core: rename NMConnection to/from_hash methods 2014-09-04 09:17:36 -04:00
nm-utils-private.h nm-utils: add a wrapper for g_strsplit_set() removing empty strings from array 2014-09-10 15:00:49 +02:00
nm-utils.c libnm-core: fix getting/setting 0-length array properties 2014-09-17 08:21:21 -04:00
nm-utils.h libnm-core: replace GByteArray with pointer + length in some APIs 2014-09-04 09:20:11 -04:00
nm-value-transforms.c libnm-core: change DBUS_TYPE_G_UCHAR_ARRAY properties to G_TYPE_BYTES 2014-09-04 09:20:11 -04:00
nm-version.h.in libnm: add libnm/libnm-core (part 1) 2014-08-01 14:34:04 -04:00
nm-vpn-dbus-interface.h all: fix up multiple-include-guard defines 2014-08-16 10:17:14 -04:00