mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-24 20:21:49 +00:00
Fix comparisons
PUBLISHED_FROM=4d86de7f73ef9d4c0f236e1fe1201e5de792f19f
This commit is contained in:
1 parent
57f964a139
commit
9937e88985
1 file changed
+5
-5
+5
-5
@@ -9691,11 +9691,11 @@ void mg_send_mqtt_handshake_opt(struct mg_connection *nc, const char *client_id,
|
|||||||
opts.flags |= MG_MQTT_HAS_PASSWORD;
|
opts.flags |= MG_MQTT_HAS_PASSWORD;
|
||||||
rem_len += (uint8_t) strlen(opts.password) + 2;
|
rem_len += (uint8_t) strlen(opts.password) + 2;
|
||||||
}
|
}
|
||||||
if (opts.will_topic != NULL && opts.will_message != NULL) {
|
if (opts.will_topic != NULL && opts.will_message != NULL) {
|
||||||
opts.flags |= MG_MQTT_HAS_WILL;
|
opts.flags |= MG_MQTT_HAS_WILL;
|
||||||
rem_len += (uint8_t) strlen(opts.will_topic) + 2;
|
rem_len += (uint8_t) strlen(opts.will_topic) + 2;
|
||||||
rem_len += (uint8_t) strlen(opts.will_message) + 2;
|
rem_len += (uint8_t) strlen(opts.will_message) + 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
mg_send(nc, &header, 1);
|
mg_send(nc, &header, 1);
|
||||||
mg_send(nc, &rem_len, 1);
|
mg_send(nc, &rem_len, 1);
|
||||||
|
|||||||
Reference in new issue
Block a user