diff options
| author | Sebastien Bacher <seb128@ubuntu.com> | 2018-08-24 11:00:09 +0200 |
|---|---|---|
| committer | Sebastien Bacher <seb128@ubuntu.com> | 2018-08-24 11:06:47 +0200 |
| commit | b7db94545968c37886b7111d8c85f62eb063fbb4 (patch) | |
| tree | 7c2aedd497b1fdcb26bf9d49f98cc63a530baf2e /src/nm-config.c | |
| parent | 9d5cdc3adde9e7e57bf5a0e754e563b6a9e8e513 (diff) | |
| parent | caf1db9d6fbc056cc6c76a24574890f6c7895f3d (diff) | |
Import Debian changes 1.12.2-0ubuntu3
network-manager (1.12.2-0ubuntu3) cosmic; urgency=medium
* debian/rules:
- use --with-libnm-glib, the default reversed since that's a legacy
library but we still need it for unity-control-center
network-manager (1.12.2-0ubuntu2) cosmic; urgency=medium
* debian/patches/git-newglib-test.patch:
- backport upstream commit to fix the tests with the new glib
network-manager (1.12.2-0ubuntu1) cosmic; urgency=medium
* New upstream version
* d/p/libnm-register-empty-NMClient-and-NetworkManager-when-loa.patch,
d/p/e91f1a7d2a6b8400b6b331d5b72287dcb5164a39.patch,
d/p/git_thunderbolt_connect.patch:
- removed, those changes are in the new version
* Backport Debian changes
* Update symbols file for libnm0
* Enable iwd support
* Drop version requirements when oldstable ships a newer version
* Drop dh_strip override, the dbgsym migration is done
* Rebase patches
* Make sure the example server.conf is actually installed
* Update install path for plugins, it now includes a version number
* Drop libnl3 build dependency.
Upstream has copied the code directly from libnl3 for the few functions it
needs with a few small modifications.
* Drop libiw build dependency.
Hasn't been needed for a long time and was simply a left over from older
releases.
* Bump Standards-Version to 4.1.5
* Fix compile error due to NM_AVAILABLE_IN_1_12_2 macro (Closes: #905372)
Diffstat (limited to 'src/nm-config.c')
| -rw-r--r-- | src/nm-config.c | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/src/nm-config.c b/src/nm-config.c index 29f0d517..d4682ed6 100644 --- a/src/nm-config.c +++ b/src/nm-config.c @@ -553,7 +553,7 @@ nm_config_create_keyfile () /* this is an external variable, to make loading testable. Other then that, * no code is supposed to change this. */ -guint _nm_config_match_nm_version = NM_VERSION_CUR_STABLE; +guint _nm_config_match_nm_version = NM_VERSION; char *_nm_config_match_env = NULL; static gboolean @@ -579,7 +579,7 @@ ignore_config_snippet (GKeyFile *keyfile, gboolean is_base_config) const char *e; e = g_getenv ("NM_CONFIG_ENABLE_TAG"); - _nm_config_match_env = g_strdup (e ? e : ""); + _nm_config_match_env = g_strdup (e ?: ""); } /* second, interpret the value as match-spec. */ @@ -615,7 +615,7 @@ _sort_groups_cmp (const char **pa, const char **pb, gpointer dummy) if (a_is_connection) { /* both are [connection.\+] entries. Reverse their order. * One of the sections might be literally [connection]. That section - * is special and it's order will be fixed later. It doesn't actually + * is special and its order will be fixed later. It doesn't actually * matter here how it compares with [connection.\+] sections. */ return pa > pb ? -1 : 1; } @@ -633,7 +633,7 @@ _sort_groups_cmp (const char **pa, const char **pb, gpointer dummy) if (a_is_device) { /* both are [device.\+] entries. Reverse their order. * One of the sections might be literally [device]. That section - * is special and it's order will be fixed later. It doesn't actually + * is special and its order will be fixed later. It doesn't actually * matter here how it compares with [device.\+] sections. */ return pa > pb ? -1 : 1; } @@ -1383,7 +1383,6 @@ intern_config_write (const char *filename, GKeyFile *keyfile; gs_strfreev char **groups = NULL; guint g, k; - gboolean has_intern = FALSE; gboolean success = FALSE; GError *local = NULL; @@ -1449,10 +1448,7 @@ intern_config_write (const char *filename, value_set = g_key_file_get_value (keyfile_intern, group, key, NULL); - if (is_intern) { - has_intern = TRUE; - g_key_file_set_value (keyfile, group, key, value_set); - } else if (is_atomic) + if (is_intern || is_atomic) g_key_file_set_value (keyfile, group, key, value_set); else { gs_free char *value_was = NULL; @@ -2117,7 +2113,7 @@ nm_config_device_state_load_all (void) if (!state) continue; - if (!nm_g_hash_table_insert (states, GINT_TO_POINTER (ifindex), state)) + if (!g_hash_table_insert (states, GINT_TO_POINTER (ifindex), state)) nm_assert_not_reached (); } g_dir_close (dir); @@ -2401,17 +2397,17 @@ _set_config_data (NMConfig *self, NMConfigData *new_data, NMConfigChangeFlags re } if (new_data) { - _LOGI ("config: signal %s (%s)", + _LOGI ("signal: %s (%s)", nm_config_change_flags_to_string (changes, NULL, 0), nm_config_data_get_config_description (new_data)); nm_config_data_log (new_data, "CONFIG: ", " ", NULL); priv->config_data = new_data; } else if (had_new_data) - _LOGI ("config: signal %s (no changes from disk)", nm_config_change_flags_to_string (changes, NULL, 0)); + _LOGI ("signal: %s (no changes from disk)", nm_config_change_flags_to_string (changes, NULL, 0)); else - _LOGI ("config: signal %s", nm_config_change_flags_to_string (changes, NULL, 0)); + _LOGI ("signal: %s", nm_config_change_flags_to_string (changes, NULL, 0)); g_signal_emit (self, signals[SIGNAL_CONFIG_CHANGED], 0, - new_data ? new_data : old_data, + new_data ?: old_data, changes, old_data); if (new_data) g_object_unref (old_data); |