NetworkManager/src
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
..
devices core: only set IPv6 hop_limit for values greater than zero 2014-09-15 12:10:24 -05:00
dhcp-manager dhcp: log DHCP client exit status better 2014-09-12 12:51:18 +02:00
dns-manager core: consolidate helper progam searching (bgo #734131) 2014-09-11 12:11:56 -05:00
dnsmasq-manager core: consolidate helper progam searching (bgo #734131) 2014-09-11 12:11:56 -05:00
firewall-manager all: remove a bunch of unnecessary dbus/dbus-glib includes 2014-09-03 10:45:24 -04:00
platform platform: add support for kernel IPv6LL address generation modes 2014-09-04 15:10:26 -05:00
ppp-manager core: consolidate helper progam searching (bgo #734131) 2014-09-11 12:11:56 -05:00
rdisc rdisc: add RA wait timeout 2014-08-29 16:03:36 -05:00
settings libnm-core: fix up connection deserialize/copy/replace semantics 2014-09-17 08:21:21 -04:00
supplicant-manager libnm-core: change DBUS_TYPE_G_UCHAR_ARRAY properties to G_TYPE_BYTES 2014-09-04 09:20:11 -04:00
tests tun: port to internal device factory 2014-09-11 12:50:17 -05:00
vpn-manager libnm-core: rename NMConnection to/from_hash methods 2014-09-04 09:17:36 -04:00
main.c libnm: rename NetworkManager.h and NetworkManagerVPN.h 2014-08-01 14:34:40 -04:00
Makefile.am tun: port to internal device factory 2014-09-11 12:50:17 -05:00
NetworkManagerUtils.c core: consolidate helper progam searching (bgo #734131) 2014-09-11 12:11:56 -05:00
NetworkManagerUtils.h core: consolidate helper progam searching (bgo #734131) 2014-09-11 12:11:56 -05:00
nm-activation-request.c all: remove a bunch of unnecessary dbus/dbus-glib includes 2014-09-03 10:45:24 -04:00
nm-activation-request.h all: fix up multiple-include-guard defines 2014-08-16 10:17:14 -04:00
nm-active-connection.c libnm: rename NetworkManager.h and NetworkManagerVPN.h 2014-08-01 14:34:40 -04:00
nm-active-connection.h all: fix up multiple-include-guard defines 2014-08-16 10:17:14 -04:00
nm-auth-subject.c settings: prefer secret agents in the same process as the request 2013-12-03 16:41:00 -05:00
nm-auth-subject.h all: fix up multiple-include-guard defines 2014-08-16 10:17:14 -04:00
nm-config.c core: update data types of some hwaddr properties 2014-08-07 15:41:04 -04:00
nm-config.h all: fix up multiple-include-guard defines 2014-08-16 10:17:14 -04:00
nm-connection-provider.c core: remove useless NMSettings::connections-loaded signal 2014-01-23 15:14:49 -05:00
nm-connection-provider.h all: fix up multiple-include-guard defines 2014-08-16 10:17:14 -04:00
nm-connectivity.c all: remove remaining GParamSpec name/blurb strings 2014-06-19 17:45:03 -04:00
nm-connectivity.h all: fix up multiple-include-guard defines 2014-08-16 10:17:14 -04:00
nm-dbus-manager.c libnm: rename NetworkManager.h and NetworkManagerVPN.h 2014-08-01 14:34:40 -04:00
nm-dbus-manager.h core: fill in nm-types.h, clean out other headers 2014-07-23 10:56:26 -04:00
nm-dcb.c core: consolidate helper progam searching (bgo #734131) 2014-09-11 12:11:56 -05:00
nm-dcb.h all: fix up multiple-include-guard defines 2014-08-16 10:17:14 -04:00
nm-dhcp4-config.c libnm: rename NetworkManager.h and NetworkManagerVPN.h 2014-08-01 14:34:40 -04:00
nm-dhcp4-config.h all: fix up multiple-include-guard defines 2014-08-16 10:17:14 -04:00
nm-dhcp6-config.c libnm: rename NetworkManager.h and NetworkManagerVPN.h 2014-08-01 14:34:40 -04:00
nm-dhcp6-config.h all: fix up multiple-include-guard defines 2014-08-16 10:17:14 -04:00
nm-dispatcher.c libnm-core: rename NMConnection to/from_hash methods 2014-09-04 09:17:36 -04:00
nm-dispatcher.h all: fix up multiple-include-guard defines 2014-08-16 10:17:14 -04:00
nm-ip4-config.c libnm-core: improve NMSettingIP4Config / NMSettingIP6Config property types 2014-09-04 09:20:11 -04:00
nm-ip4-config.h all: fix up multiple-include-guard defines 2014-08-16 10:17:14 -04:00
nm-ip6-config.c libnm-core: improve NMSettingIP4Config / NMSettingIP6Config property types 2014-09-04 09:20:11 -04:00
nm-ip6-config.h all: fix up multiple-include-guard defines 2014-08-16 10:17:14 -04:00
nm-logging.c core/logging: change order or domain/level arguments for nm_log() 2014-08-01 19:06:25 +02:00
nm-logging.h all: fix up multiple-include-guard defines 2014-08-16 10:17:14 -04:00
nm-manager-auth.c all: remove a bunch of unnecessary dbus/dbus-glib includes 2014-09-03 10:45:24 -04:00
nm-manager-auth.h all: fix up multiple-include-guard defines 2014-08-16 10:17:14 -04:00
nm-manager.c core: fix casting of factory type (bgo #736780) 2014-09-17 11:19:41 +02:00
nm-manager.h trivial: spacing and code cleanups in nm-manager.h 2014-09-11 12:40:08 -05:00
nm-policy.c libnm, core, cli, tui: fix the capitalization of various types 2014-08-01 14:34:06 -04:00
nm-policy.h all: fix up multiple-include-guard defines 2014-08-16 10:17:14 -04:00
nm-posix-signals.c core: merge src/config, src/logging, src/posix-signals into src/ 2014-07-30 15:56:29 -04:00
nm-posix-signals.h all: fix up multiple-include-guard defines 2014-08-16 10:17:14 -04:00
nm-properties-changed-signal.c logging: tweak logging-enabled functions 2013-12-20 09:57:13 -05:00
nm-properties-changed-signal.h core: make nm-properties-changed-signal always export the right properties 2013-05-20 16:38:33 -03:00
nm-rfkill-manager.c core: split NMRfkillManager out of NMUdevManager 2013-06-05 17:49:24 -03:00
nm-rfkill-manager.h all: fix up multiple-include-guard defines 2014-08-16 10:17:14 -04:00
nm-session-monitor-ck.c core: make NMSessionMonitor non-refcounted 2013-12-03 16:39:37 -05:00
nm-session-monitor-null.c core: make NMSessionMonitor non-refcounted 2013-12-03 16:39:37 -05:00
nm-session-monitor-systemd.c sessions: fix return value handling for sd_uid_get_sessions() (bgo #707983) 2014-01-23 16:48:19 -06:00
nm-session-monitor.h all: fix up multiple-include-guard defines 2014-08-16 10:17:14 -04:00
nm-session-utils.c Use glib-mkenums to generate enum types 2012-02-15 11:42:15 -05:00
nm-session-utils.h all: fix up multiple-include-guard defines 2014-08-16 10:17:14 -04:00
nm-sleep-monitor-systemd.c all: remove a bunch of unnecessary dbus/dbus-glib includes 2014-09-03 10:45:24 -04:00
nm-sleep-monitor-upower.c core: convert the DBus manager to a single-ref object 2013-05-20 16:38:33 -03:00
nm-sleep-monitor.h all: fix up multiple-include-guard defines 2014-08-16 10:17:14 -04:00
nm-types.h all: fix up multiple-include-guard defines 2014-08-16 10:17:14 -04:00
org.freedesktop.NetworkManager.conf dbus: kill at_console usage in permissions (bgo #707983) (rh #979416) 2014-01-23 16:48:19 -06:00