ifnet: fix GError handling in ifnet_update_connection_from_config_block()
This commit is contained in:
@@ -1742,27 +1742,27 @@ ifnet_update_connection_from_config_block (const char *conn_name, GError **error
|
|||||||
|
|
||||||
/* IPv4 setting */
|
/* IPv4 setting */
|
||||||
make_ip4_setting (connection, conn_name, error);
|
make_ip4_setting (connection, conn_name, error);
|
||||||
if (error && *error)
|
if (error && *error) {
|
||||||
PLUGIN_WARN (IFNET_PLUGIN_NAME,
|
PLUGIN_WARN (IFNET_PLUGIN_NAME, "Found error: %s", (*error)->message);
|
||||||
"Found error: %s", (*error)->message);
|
goto error;
|
||||||
|
}
|
||||||
|
|
||||||
/* IPv6 setting */
|
/* IPv6 setting */
|
||||||
make_ip6_setting (connection, conn_name, error);
|
make_ip6_setting (connection, conn_name, error);
|
||||||
if (error && *error)
|
if (error && *error) {
|
||||||
PLUGIN_WARN (IFNET_PLUGIN_NAME,
|
PLUGIN_WARN (IFNET_PLUGIN_NAME, "Found error: %s", (*error)->message);
|
||||||
"Found error: %s", (*error)->message);
|
goto error;
|
||||||
|
}
|
||||||
|
|
||||||
success = nm_connection_verify (connection, error);
|
success = nm_connection_verify (connection, error);
|
||||||
if (error && *error)
|
if (error && *error)
|
||||||
PLUGIN_WARN (IFNET_PLUGIN_NAME,
|
PLUGIN_WARN (IFNET_PLUGIN_NAME, "Found error: %s", (*error)->message);
|
||||||
"Found error: %s", (*error)->message);
|
|
||||||
PLUGIN_PRINT (IFNET_PLUGIN_NAME, "Connection verified %s:%d", conn_name, success);
|
PLUGIN_PRINT (IFNET_PLUGIN_NAME, "Connection verified %s:%d", conn_name, success);
|
||||||
if (!success)
|
if (!success)
|
||||||
goto error;
|
goto error;
|
||||||
return connection;
|
return connection;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
g_object_unref (setting);
|
|
||||||
g_object_unref (connection);
|
g_object_unref (connection);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user