From 4d54a51c62755ebb2c73ecc895698bab8215502d Mon Sep 17 00:00:00 2001 From: "Roger A. Light" Date: Tue, 21 May 2019 11:23:00 +0100 Subject: [PATCH] Stop some error messages being printed even when `--quiet` was used. Thanks to Rob de Jonge. Closes #1284. --- ChangeLog.txt | 3 +-- client/client_shared.c | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 1e17d3d2..8796b5e1 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -43,8 +43,6 @@ Clients: - Fix mosquitto_pub not using the `-c` option. Closes #1273. - Fix MQTT v5 clients not being able to specify a password without a username. Closes #1274. - -Clients: - Fix `mosquitto_pub -l` not handling network failures. Closes #1152. - Fix double free on exit in mosquitto_pub. Closes #1280. @@ -54,6 +52,7 @@ Documentation: Build: - CLIENT_LDFLAGS now uses LDFLAGS. Closes #1294. +======= 1.6.2 - 20190430 diff --git a/client/client_shared.c b/client/client_shared.c index ede8baa1..69d2dc36 100644 --- a/client/client_shared.c +++ b/client/client_shared.c @@ -1081,8 +1081,8 @@ int client_opts_set(struct mosquitto *mosq, struct mosq_config *cfg) } cfg->will_props = NULL; - if((cfg->username || cfg->password) && mosquitto_username_pw_set(mosq, cfg->username, cfg->password)){ - err_printf(cfg, "Error: Problem setting username and/or password.\n"); + if(cfg->username && mosquitto_username_pw_set(mosq, cfg->username, cfg->password)){ + err_printf(cfg, "Error: Problem setting username and password.\n"); mosquitto_lib_cleanup(); return 1; }