Get rid of MG_ENABLE_LOG, change mg_hexdump()

This commit is contained in:
Sergey Lyubka committed 2022-05-06 21:09:13 +01:00
1 parent 6db0485c7b
commit bc16854ccb
13 files changed
+117 -167

No files matched your search

+2 -3
View File
@@ -148,9 +148,8 @@ static void dns_cb(struct mg_connection *c, int ev, void *ev_data,
struct mg_dns_message dm;
int resolved = 0;
if (mg_dns_parse(c->recv.buf, c->recv.len, &dm) == false) {
char *s = mg_hexdump(c->recv.buf, c->recv.len);
MG_ERROR(("Unexpected DNS response:\n%s\n", s));
free(s);
MG_ERROR(("Unexpected DNS response:"));
mg_hexdump(c->recv.buf, c->recv.len);
} else {
MG_VERBOSE(("%s %d", dm.name, dm.resolved));
for (d = (struct dns_data *) c->mgr->active_dns_requests; d != NULL;