Add support for Windriver's Diab v4 (stricter C89)

This commit is contained in:
Sergio R. Caprile committed 2025-12-04 13:58:49 -03:00
1 parent 4717a15c17
commit 5b023cb85b
19 files changed
+347 -215

No files matched your search

+2 -1
View File
@@ -266,7 +266,8 @@ void mg_mqtt_login(struct mg_connection *c, const struct mg_mqtt_opts *opts) {
char client_id[21];
struct mg_str cid = opts->client_id;
size_t total_len = 7 + 1 + 2 + 2;
uint8_t hdr[8] = {0, 4, 'M', 'Q', 'T', 'T', opts->version, 0};
uint8_t hdr[8] = {0, 4, 'M', 'Q', 'T', 'T', 0, 0};
hdr[6] = opts->version;
if (cid.len == 0) {
mg_random_str(client_id, sizeof(client_id) - 1);