From e654b001d8d5ab9cb14ba65348bd7827774b53c9 Mon Sep 17 00:00:00 2001 From: Qubeck Date: Sat, 7 Apr 2018 16:15:41 +0200 Subject: [PATCH] Fix for 'New connection from...' messages can not be disabled by 'connection_messages false' --- src/net.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/net.c b/src/net.c index 3e0e3bcc0..801ec8bcc 100644 --- a/src/net.c +++ b/src/net.c @@ -196,7 +196,9 @@ int net__socket_accept(struct mosquitto_db *db, mosq_sock_t listensock) } #endif - log__printf(NULL, MOSQ_LOG_NOTICE, "New connection from %s on port %d.", new_context->address, new_context->listener->port); + if (db->config->connection_messages == true) { + log__printf(NULL, MOSQ_LOG_NOTICE, "New connection from %s on port %d.", new_context->address, new_context->listener->port); + } return new_sock; }