Expose mip guts

This commit is contained in:
cpq committed 2022-11-09 19:25:40 +00:00
1 parent eed25f23f6
commit abfac8aa40
15 files changed
+222 -258

No files matched your search

+1 -1
View File
@@ -173,7 +173,7 @@ int mg_mqtt_parse(const uint8_t *buf, size_t len, uint8_t version,
p += 2;
}
if (p > end) return MQTT_MALFORMED;
if (version == 5) p += 1 + p[0]; // Skip options
if (version == 5 && p + 1 < end) p += 1 + p[0]; // Skip options
if (p > end) return MQTT_MALFORMED;
m->data.ptr = (char *) p;
m->data.len = (size_t) (end - p);
-1
View File
@@ -244,7 +244,6 @@ void mg_mgr_free(struct mg_mgr *mgr) {
#if MG_ENABLE_EPOLL
if (mgr->epoll_fd >= 0) close(mgr->epoll_fd), mgr->epoll_fd = -1;
#endif
free(mgr->priv);
}
void mg_mgr_init(struct mg_mgr *mgr) {