summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Winship <danw@redhat.com>2014-12-02 09:32:35 -0500
committerDan Winship <danw@redhat.com>2014-12-02 09:32:35 -0500
commita25fc825bd9749433edb72320b72462efaed5a95 (patch)
treea97dbe06f72969d48d42ba4bfeb1af95143c0ff5
parent9c2be08ea957429a35e0853c7e82a4adba44dddf (diff)
downloadNetworkManager-danw/nm-utils-init-0910-bgo740893.tar.gz
core: call nm_utils_init() (bgo 730893)danw/nm-utils-init-0910-bgo740893
NetworkManager wasn't calling nm_utils_init(), and yet somehow everything still worked with crypto_nss. But not with crypto_gnutls. Fix this.
-rw-r--r--src/main.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 0ba65b0b8a..0713bc8d66 100644
--- a/src/main.c
+++ b/src/main.c
@@ -55,6 +55,7 @@
#include "nm-posix-signals.h"
#include "nm-session-monitor.h"
#include "nm-dispatcher.h"
+#include "nm-utils.h"
#if !defined(NM_DIST_VERSION)
# define NM_DIST_VERSION VERSION
@@ -401,6 +402,13 @@ main (int argc, char *argv[])
exit (1);
}
+ if (!nm_utils_init (&error)) {
+ fprintf (stderr, _("Unable to initialize NetworkManager libraries: %s\n"),
+ error->message);
+ g_error_free (error);
+ exit (1);
+ }
+
for (i = 0; options[i].long_name; i++) {
if (!strcmp (options[i].long_name, "log-level")) {
options[i].description = g_strdup_printf (options[i].description,