From 2d045dbc85fbe9b5287af1ec0ce89e68d6cbbd09 Mon Sep 17 00:00:00 2001 From: "Roger A. Light" Date: Mon, 3 Jan 2022 21:47:34 +0000 Subject: [PATCH] Fix option name. --- src/conf.c | 6 +++--- test/broker/01-connect-accept-protocol.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/conf.c b/src/conf.c index d2b23b60..291a8ab2 100644 --- a/src/conf.c +++ b/src/conf.c @@ -823,16 +823,16 @@ static int config__read_file_core(struct mosquitto__config *config, bool reload, } token = strtok_r((*buf), " ", &saveptr); if(token){ - if(!strcmp(token, "accept_protocol_version")){ + if(!strcmp(token, "accept_protocol_versions")){ if(cur_listener == &config->default_listener){ - log__printf(NULL, MOSQ_LOG_ERR, "Error: You must define a listener before using the %s option.", "accept_protocol_version"); + log__printf(NULL, MOSQ_LOG_ERR, "Error: You must define a listener before using the %s option.", "accept_protocol_versions"); return MOSQ_ERR_INVAL; } cur_listener->disable_protocol_v3 = true; cur_listener->disable_protocol_v4 = true; cur_listener->disable_protocol_v5 = true; if(saveptr == NULL){ - log__printf(NULL, MOSQ_LOG_ERR, "Error: Empty %s value in configuration.", "accept_protocol_version"); + log__printf(NULL, MOSQ_LOG_ERR, "Error: Empty %s value in configuration.", "accept_protocol_versions"); return MOSQ_ERR_INVAL; } token = strtok_r(saveptr, ", \t", &saveptr); diff --git a/test/broker/01-connect-accept-protocol.py b/test/broker/01-connect-accept-protocol.py index 4f4bf00f..44e7e3a9 100755 --- a/test/broker/01-connect-accept-protocol.py +++ b/test/broker/01-connect-accept-protocol.py @@ -8,7 +8,7 @@ def write_config(filename, port, accept): with open(filename, 'w') as f: f.write("listener %s\n" % (port)) f.write("allow_anonymous true\n") - f.write("accept_protocol_version %s\n" % (accept)) + f.write("accept_protocol_versions %s\n" % (accept)) def do_test(accept, expect_success): port = mosq_test.get_port()