aboutsummaryrefslogtreecommitdiffstats
path: root/src/frontends/osx
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2017-01-23 17:14:01 +0100
committerTobias Brunner <tobias@strongswan.org>2017-01-25 14:58:09 +0100
commit9665686bd807d70041b22312936034bf256d2b8c (patch)
tree3f16de89f0f6dcef78331cfe40acc12547ba0bb6 /src/frontends/osx
parentff22d53ba9949d20d00e4d2137fcdb354627565e (diff)
downloadstrongswan-9665686bd807d70041b22312936034bf256d2b8c.tar.bz2
strongswan-9665686bd807d70041b22312936034bf256d2b8c.tar.xz
daemon: Use separate method to set default loggers
This way it is not necessary to pass the same values to reload the loggers.
Diffstat (limited to 'src/frontends/osx')
-rw-r--r--src/frontends/osx/charon-xpc/charon-xpc.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/frontends/osx/charon-xpc/charon-xpc.c b/src/frontends/osx/charon-xpc/charon-xpc.c
index 14ce2e215..e3063f2ff 100644
--- a/src/frontends/osx/charon-xpc/charon-xpc.c
+++ b/src/frontends/osx/charon-xpc/charon-xpc.c
@@ -42,11 +42,6 @@ void dispatcher_cleanup()
}
/**
- * Loglevel configuration
- */
-static level_t levels[DBG_MAX];
-
-/**
* hook in library for debugging messages
*/
extern void (*dbg) (debug_t group, level_t level, char *fmt, ...);
@@ -154,6 +149,7 @@ int main(int argc, char *argv[])
{
struct sigaction action;
struct utsname utsname;
+ level_t levels[DBG_MAX];
int group;
dbg = dbg_stderr;
@@ -178,7 +174,8 @@ int main(int argc, char *argv[])
{
levels[group] = LEVEL_CTRL;
}
- charon->load_loggers(charon, levels, TRUE);
+ charon->set_default_loggers(charon, levels, TRUE);
+ charon->load_loggers(charon);
lib->settings->set_default_str(lib->settings, "charon-xpc.port", "0");
lib->settings->set_default_str(lib->settings, "charon-xpc.port_nat_t", "0");