mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-02 13:20:51 +00:00
Add support for Windriver's Diab v4 (stricter C89)
This commit is contained in:
1 parent
4717a15c17
commit
5b023cb85b
19 files changed
+347
-215
No files matched your search
+2
-1
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user