Fix #1520 - move state to struct mg_mgr

This commit is contained in:
Sergey Lyubka committed 2022-04-12 14:14:55 +01:00
1 parent 66376885e9
commit ef44f90491
24 files changed
+218 -276

No files matched your search

+1 -2
View File
@@ -194,7 +194,7 @@ char *mg_hexdump(const void *buf, size_t len) {
char *mg_hex(const void *buf, size_t len, char *to) {
const unsigned char *p = (const unsigned char *) buf;
static const char *hex = "0123456789abcdef";
const char *hex = "0123456789abcdef";
size_t i = 0;
for (; len--; p++) {
to[i++] = hex[p[0] >> 4];
@@ -261,7 +261,6 @@ uint64_t mg_tou64(struct mg_str str) {
while (i < str.len && str.ptr[i] >= '0' && str.ptr[i] <= '9') {
result *= 10;
result += (unsigned) (str.ptr[i] - '0');
MG_INFO(("[%.*s] %llu", (int) str.len, str.ptr, result));
i++;
}
return result;