From d724097397a470755ce1cb203cb3870d7a349f53 Mon Sep 17 00:00:00 2001 From: xengineering Date: Thu, 6 Oct 2022 21:58:37 +0200 Subject: Remove global variable log --- net.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/net.c b/net.c index 9f2b4f3..a3e30a3 100644 --- a/net.c +++ b/net.c @@ -25,7 +25,6 @@ typedef enum { // these variables stay initialized for the whole runtime static net_state_t state; -static xmpp_log_t* log; static xmpp_ctx_t* ctx; // these variables stay initialized while the application is not disconnected @@ -136,8 +135,7 @@ void net_init(void) { fprintf(stderr, "net_init()\n"); xmpp_initialize(); - log = xmpp_get_default_logger(XMPP_LEVEL_DEBUG); // or NULL for silence - ctx = xmpp_ctx_new(NULL, log); + ctx = xmpp_ctx_new(NULL, xmpp_get_default_logger(XMPP_LEVEL_DEBUG)); state = DISCONNECTED; @@ -176,7 +174,6 @@ void net_quit(void) { fprintf(stderr, "net_quit()\n"); net_disconnect(); - log = NULL; xmpp_shutdown(); } -- cgit v1.2.3-70-g09d2