mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-06 11:28:32 +02:00
nmtst: call nm_utils_init() in nmtst_init()
Signed-off-by: Thomas Haller <thaller@redhat.com>
This commit is contained in:
parent
5d3bef5d3f
commit
284ef00d16
1 changed files with 7 additions and 0 deletions
|
|
@ -32,6 +32,8 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
|
#include "nm-utils.h"
|
||||||
|
|
||||||
|
|
||||||
struct __nmtst_internal
|
struct __nmtst_internal
|
||||||
{
|
{
|
||||||
|
|
@ -125,6 +127,7 @@ inline static void
|
||||||
nmtst_init (int *argc, char ***argv, const char *log_level, const char *log_domains)
|
nmtst_init (int *argc, char ***argv, const char *log_level, const char *log_domains)
|
||||||
{
|
{
|
||||||
static gsize atexit_registered = 0;
|
static gsize atexit_registered = 0;
|
||||||
|
GError *error = NULL;
|
||||||
const char *nmtst_debug;
|
const char *nmtst_debug;
|
||||||
gboolean is_debug = FALSE;
|
gboolean is_debug = FALSE;
|
||||||
char *c_log_level = NULL, *c_log_domains = NULL;
|
char *c_log_level = NULL, *c_log_domains = NULL;
|
||||||
|
|
@ -222,6 +225,10 @@ nmtst_init (int *argc, char ***argv, const char *log_level, const char *log_doma
|
||||||
g_assert (success);
|
g_assert (success);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!nm_utils_init (&error))
|
||||||
|
g_error ("failed to initialize libnm-util: %s", error->message);
|
||||||
|
g_assert (!error);
|
||||||
|
|
||||||
/* Delay messages until we setup logging. */
|
/* Delay messages until we setup logging. */
|
||||||
for (i = 0; i < debug_messages->len; i++)
|
for (i = 0; i < debug_messages->len; i++)
|
||||||
g_message ("%s", g_array_index (debug_messages, const char *, i));
|
g_message ("%s", g_array_index (debug_messages, const char *, i));
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue