From 712cbfe5999ca401abd67bc15065b2d93a2926bf Mon Sep 17 00:00:00 2001 From: "Roger A. Light" Date: Wed, 9 Aug 2017 23:59:08 +0100 Subject: [PATCH] Default to mqtt v3.1.1 for clients. --- client/client_shared.c | 2 +- client/pub_client.c | 2 +- client/sub_client.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/client/client_shared.c b/client/client_shared.c index 28e8e5df..4d1882c5 100644 --- a/client/client_shared.c +++ b/client/client_shared.c @@ -123,7 +123,7 @@ void init_config(struct mosq_config *cfg) cfg->keepalive = 60; cfg->clean_session = true; cfg->eol = true; - cfg->protocol_version = MQTT_PROTOCOL_V31; + cfg->protocol_version = MQTT_PROTOCOL_V311; } void client_config_cleanup(struct mosq_config *cfg) diff --git a/client/pub_client.c b/client/pub_client.c index 481e4333..165082cd 100644 --- a/client/pub_client.c +++ b/client/pub_client.c @@ -255,7 +255,7 @@ void print_usage(void) printf(" -t : mqtt topic to publish to.\n"); printf(" -u : provide a username (requires MQTT 3.1 broker)\n"); printf(" -V : specify the version of the MQTT protocol to use when connecting.\n"); - printf(" Can be mqttv31 or mqttv311. Defaults to mqttv31.\n"); + printf(" Can be mqttv31 or mqttv311. Defaults to mqttv311.\n"); printf(" --help : display this message.\n"); printf(" --quiet : don't print error messages.\n"); printf(" --will-payload : payload for the client Will, which is sent by the broker in case of\n"); diff --git a/client/sub_client.c b/client/sub_client.c index 5f2a0364..1fb6fb75 100644 --- a/client/sub_client.c +++ b/client/sub_client.c @@ -447,7 +447,7 @@ void print_usage(void) printf(" -U : unsubscribe from a topic. May be repeated.\n"); printf(" -v : print published messages verbosely.\n"); printf(" -V : specify the version of the MQTT protocol to use when connecting.\n"); - printf(" Can be mqttv31 or mqttv311. Defaults to mqttv31.\n"); + printf(" Can be mqttv31 or mqttv311. Defaults to mqttv311.\n"); printf(" --help : display this message.\n"); printf(" --quiet : don't print error messages.\n"); printf(" --retained-only : only handle messages with the retained flag set, and exit when the\n");