ifcfg-rh: remove verify() connection during reading

At the end of reading the connection, reader calls nm_connection_normalize()
to normalize the connection. Normalization inplicitly verifies the
connection.

Doing a verify along the way is not needed and even harmful. Soon further
checks will be added that make verify() fail, but normalize()
can fix the connection. So, while reading, we might actually have
an invalid connection, that will be normalized as last step.

Signed-off-by: Thomas Haller <thaller@redhat.com>
This commit is contained in:
Thomas Haller 2014-07-08 14:20:40 +02:00
parent 92d8286660
commit 686e912b82

View file

@ -3802,11 +3802,6 @@ wireless_connection_from_ifcfg (const char *file,
}
nm_connection_add_setting (connection, con_setting);
if (!nm_connection_verify (connection, error)) {
g_object_unref (connection);
return NULL;
}
return connection;
}
@ -4020,11 +4015,6 @@ wired_connection_from_ifcfg (const char *file,
if (s_8021x)
nm_connection_add_setting (connection, NM_SETTING (s_8021x));
if (!nm_connection_verify (connection, error)) {
g_object_unref (connection);
return NULL;
}
return connection;
}
@ -4183,11 +4173,6 @@ infiniband_connection_from_ifcfg (const char *file,
}
nm_connection_add_setting (connection, infiniband_setting);
if (!nm_connection_verify (connection, error)) {
g_object_unref (connection);
return NULL;
}
return connection;
}
@ -4308,11 +4293,6 @@ bond_connection_from_ifcfg (const char *file,
if (s_8021x)
nm_connection_add_setting (connection, NM_SETTING (s_8021x));
if (!nm_connection_verify (connection, error)) {
g_object_unref (connection);
return NULL;
}
return connection;
}
@ -4419,11 +4399,6 @@ team_connection_from_ifcfg (const char *file,
if (s_8021x)
nm_connection_add_setting (connection, NM_SETTING (s_8021x));
if (!nm_connection_verify (connection, error)) {
g_object_unref (connection);
return NULL;
}
return connection;
}
@ -4604,11 +4579,6 @@ bridge_connection_from_ifcfg (const char *file,
}
nm_connection_add_setting (connection, bridge_setting);
if (!nm_connection_verify (connection, error)) {
g_object_unref (connection);
return NULL;
}
return connection;
}
@ -4921,10 +4891,6 @@ vlan_connection_from_ifcfg (const char *file,
if (s_8021x)
nm_connection_add_setting (connection, NM_SETTING (s_8021x));
if (!nm_connection_verify (connection, error)) {
g_object_unref (connection);
return NULL;
}
return connection;
}