aboutsummaryrefslogtreecommitdiffhomepage
path: root/backends
diff options
context:
space:
mode:
authorcbdev <cb@cbcdn.com>2021-10-20 23:15:10 +0200
committercbdev <cb@cbcdn.com>2021-10-20 23:15:10 +0200
commit37af7a72ec5864e81323ce979e53e64175a3a937 (patch)
tree8e1ba5635b05e25b688b0b7a2bcbb58f19c29c45 /backends
parentc7eb311fa1357c7f1bda1e54a25208f25be93aa4 (diff)
downloadmidimonster-37af7a72ec5864e81323ce979e53e64175a3a937.tar.gz
midimonster-37af7a72ec5864e81323ce979e53e64175a3a937.tar.bz2
midimonster-37af7a72ec5864e81323ce979e53e64175a3a937.zip
Minor MQTT fix
Diffstat (limited to 'backends')
-rw-r--r--backends/mqtt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/backends/mqtt.c b/backends/mqtt.c
index 6d25fd3..c9a303e 100644
--- a/backends/mqtt.c
+++ b/backends/mqtt.c
@@ -314,11 +314,11 @@ static int mqtt_reconnect(instance* inst){
//prepare CONNECT message header
variable_header[6] = data->mqtt_version;
- variable_header[7] = 0x02 /*clean start*/ | (data->user ? 0x80 : 0x00) | (data->user ? 0x40 : 0x00);
+ variable_header[7] = 0x02 /*clean start*/ | (data->user ? 0x80 : 0x00) | (data->password ? 0x40 : 0x00);
if(data->mqtt_version == 0x05){ //mqtt v5 has additional options
//push number of option bytes (as a varint, no less) before actually pushing the option data.
- //obviously someone thought saving 3 whole bytes in exchange for not being able to sequentially creating the package was smart..
+ //obviously someone thought saving 3 whole bytes in exchange for not being able to sequentially create the package was smart..
variable_header[vh_offset++] = 8;
//push maximum packet size option
variable_header[vh_offset++] = 0x27;