summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2014-08-13 16:45:51 +0200
committerThomas Haller <thaller@redhat.com>2014-08-14 01:11:09 +0200
commit6f75d1d4574d7f6ea13f84db786d2dca3c9fafee (patch)
tree2170116b121ad57498c82169a028f422d183fca1
parent69d9cc715c7893b128dfed6b38f2d1cc0b606670 (diff)
downloadNetworkManager-6f75d1d4574d7f6ea13f84db786d2dca3c9fafee.tar.gz
fixup! libnm-core: make failure cases for nm_connection_normalize() more robust against bugs
-rw-r--r--libnm-core/nm-connection.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libnm-core/nm-connection.c b/libnm-core/nm-connection.c
index 6251c8f29c..d26c23ab87 100644
--- a/libnm-core/nm-connection.c
+++ b/libnm-core/nm-connection.c
@@ -988,14 +988,16 @@ nm_connection_normalize (NMConnection *connection,
if (success != NM_SETTING_VERIFY_SUCCESS) {
/* we would expect, that after normalization, the connection can be verified.
* Also treat NM_SETTING_VERIFY_NORMALIZABLE as failure, because there is something
- * odd going on. */
+ * odd going on.
+ * Reaching this line of code is actually a bug in verify(), but since it can be
+ * triggered from external, we don't want to g_warn() about it. */
if (error && !*error) {
g_set_error_literal (error,
NM_CONNECTION_ERROR,
NM_CONNECTION_ERROR_UNKNOWN,
_("Unexpected failure to normalize the connection"));
}
- g_return_val_if_reached (FALSE);
+ return FALSE;
}
/* we would expect, that the connection was modified during normalization. */