TLS nits, more DNS logging

This commit is contained in:
cpq committed 2021-04-22 15:21:16 +01:00
1 parent 1b8624f135
commit 35a8b8e8e8
3 files changed
+32 -20

No files matched your search

+6 -2
View File
@@ -241,14 +241,18 @@ static void mg_sendnsreq(struct mg_connection *c, struct mg_str *name, int ms,
} else if ((d = (struct dns_data *) calloc(1, sizeof(*d))) == NULL) {
mg_error(c, "resolve OOM");
} else {
#if MG_ENABLE_LOG
char buf[100];
#endif
d->txnid = s_reqs ? s_reqs->txnid + 1 : 1;
d->next = s_reqs;
s_reqs = d;
d->expire = mg_millis() + ms;
d->c = c;
c->is_resolving = 1;
LOG(LL_VERBOSE_DEBUG, ("%lu resolving %.*s, txnid %hu", c->id,
(int) name->len, name->ptr, d->txnid));
LOG(LL_VERBOSE_DEBUG,
("%lu resolving %.*s @ %s, txnid %hu", c->id, (int) name->len,
name->ptr, mg_ntoa(&dnsc->c->peer, buf, sizeof(buf)), d->txnid));
mg_dns_send(dnsc->c, name, d->txnid, ipv6);
}
}