Commit 57e32b87 authored by Deomid Ryabkov's avatar Deomid Ryabkov Committed by Cesanta Bot

Fix MQTT will_message length calculation

PUBLISHED_FROM=d2400f6ef4837411586fb27db0b1fa03d94283c6
parent 69266555
......@@ -10011,7 +10011,7 @@ void mg_send_mqtt_handshake_opt(struct mg_connection *nc, const char *client_id,
rem_len += 2 + hlen;
hlen = strlen(opts.will_message);
nlen = htons((uint16_t) nlen);
nlen = htons((uint16_t) hlen);
mg_send(nc, &nlen, 2);
mg_send(nc, opts.will_message, hlen);
rem_len += 2 + hlen;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment