mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-04-14 12:20:44 +02:00
libnm-util: Note that nm_utils_deinit() is a no-op
nm_utils_deinit() is a no-op, so don't suggest that people need to call it.
This commit is contained in:
parent
926f4e1473
commit
539fac8b67
5 changed files with 5 additions and 30 deletions
|
|
@ -70,8 +70,6 @@ GQuark _nm_crypto_error_quark (void);
|
|||
|
||||
gboolean crypto_init (GError **error);
|
||||
|
||||
void crypto_deinit (void);
|
||||
|
||||
GByteArray *crypto_decrypt_private_key_data (const GByteArray *contents,
|
||||
const char *password,
|
||||
NMCryptoKeyType *out_key_type,
|
||||
|
|
|
|||
|
|
@ -56,11 +56,6 @@ crypto_init (GError **error)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
crypto_deinit (void)
|
||||
{
|
||||
}
|
||||
|
||||
gboolean
|
||||
crypto_md5_hash (const char *salt,
|
||||
const gsize salt_len,
|
||||
|
|
|
|||
|
|
@ -71,11 +71,6 @@ crypto_init (GError **error)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
crypto_deinit (void)
|
||||
{
|
||||
}
|
||||
|
||||
gboolean
|
||||
crypto_md5_hash (const char *salt,
|
||||
const gsize salt_len,
|
||||
|
|
|
|||
|
|
@ -222,10 +222,8 @@ static gboolean initialized = FALSE;
|
|||
* nm_utils_init:
|
||||
* @error: location to store error, or %NULL
|
||||
*
|
||||
* Initializes libnm-util; should be called when starting and program that
|
||||
* uses libnm-util. Sets up an atexit() handler to ensure de-initialization
|
||||
* is performed, but calling nm_utils_deinit() to explicitly deinitialize
|
||||
* libnm-util can also be done. This function can be called more than once.
|
||||
* Initializes libnm-util; should be called when starting any program that
|
||||
* uses libnm-util. This function can be called more than once.
|
||||
*
|
||||
* Returns: %TRUE if the initialization was successful, %FALSE on failure.
|
||||
**/
|
||||
|
|
@ -249,18 +247,12 @@ nm_utils_init (GError **error)
|
|||
/**
|
||||
* nm_utils_deinit:
|
||||
*
|
||||
* Frees all resources used internally by libnm-util. This function is called
|
||||
* from an atexit() handler, set up by nm_utils_init(), but is safe to be called
|
||||
* more than once. Subsequent calls have no effect until nm_utils_init() is
|
||||
* called again.
|
||||
* No-op. Although this function still exists for ABI compatibility reasons, it
|
||||
* does not have any effect, and does not ever need to be called.
|
||||
**/
|
||||
void
|
||||
nm_utils_deinit (void)
|
||||
{
|
||||
if (initialized) {
|
||||
crypto_deinit ();
|
||||
initialized = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
/* ssid helpers */
|
||||
|
|
|
|||
|
|
@ -412,7 +412,6 @@ int
|
|||
main (int argc, char **argv)
|
||||
{
|
||||
GError *error = NULL;
|
||||
int ret;
|
||||
|
||||
nmtst_init (&argc, &argv, TRUE);
|
||||
|
||||
|
|
@ -462,10 +461,6 @@ main (int argc, char **argv)
|
|||
"pkcs8-enc-key.pem, 1234567890",
|
||||
test_pkcs8);
|
||||
|
||||
ret = g_test_run ();
|
||||
|
||||
crypto_deinit ();
|
||||
|
||||
return ret;
|
||||
return g_test_run ();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue