mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-27 13:53:31 +01:00
Use tor_socket_strerror in eventdns.c. Fixes bug 987.
This commit is contained in:
parent
f334297d38
commit
99c315a473
@ -1,3 +1,9 @@
|
|||||||
|
Changes in version 0.2.1.16-?? - 2009-??-??
|
||||||
|
o Minor bugfixes (on 0.2.0.x):
|
||||||
|
- Log correct error messages for DNS-related network errors on
|
||||||
|
Windows.
|
||||||
|
|
||||||
|
|
||||||
Changes in version 0.2.1.15-rc - 2009-05-25
|
Changes in version 0.2.1.15-rc - 2009-05-25
|
||||||
o Major bugfixes (on 0.2.0.x):
|
o Major bugfixes (on 0.2.0.x):
|
||||||
- Fix a timing-dependent, allocator-dependent, DNS-related crash bug
|
- Fix a timing-dependent, allocator-dependent, DNS-related crash bug
|
||||||
|
@ -1299,7 +1299,7 @@ nameserver_read(struct nameserver *ns) {
|
|||||||
if (r < 0) {
|
if (r < 0) {
|
||||||
int err = last_error(ns->socket);
|
int err = last_error(ns->socket);
|
||||||
if (error_is_eagain(err)) return;
|
if (error_is_eagain(err)) return;
|
||||||
nameserver_failed(ns, strerror(err));
|
nameserver_failed(ns, tor_socket_strerror(err));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
/* XXX Match port too? */
|
/* XXX Match port too? */
|
||||||
@ -1331,7 +1331,7 @@ server_port_read(struct evdns_server_port *s) {
|
|||||||
int err = last_error(s->socket);
|
int err = last_error(s->socket);
|
||||||
if (error_is_eagain(err)) return;
|
if (error_is_eagain(err)) return;
|
||||||
log(EVDNS_LOG_WARN, "Error %s (%d) while reading request.",
|
log(EVDNS_LOG_WARN, "Error %s (%d) while reading request.",
|
||||||
strerror(err), err);
|
tor_socket_strerror(err), err);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
request_parse(packet, r, s, (struct sockaddr*) &addr, addrlen);
|
request_parse(packet, r, s, (struct sockaddr*) &addr, addrlen);
|
||||||
@ -1350,7 +1350,7 @@ server_port_flush(struct evdns_server_port *port)
|
|||||||
int err = last_error(port->socket);
|
int err = last_error(port->socket);
|
||||||
if (error_is_eagain(err))
|
if (error_is_eagain(err))
|
||||||
return;
|
return;
|
||||||
log(EVDNS_LOG_WARN, "Error %s (%d) while writing response to port; dropping", strerror(err), err);
|
log(EVDNS_LOG_WARN, "Error %s (%d) while writing response to port; dropping", tor_socket_strerror(err), err);
|
||||||
}
|
}
|
||||||
if (server_request_free(req)) {
|
if (server_request_free(req)) {
|
||||||
/* we released the last reference to req->port. */
|
/* we released the last reference to req->port. */
|
||||||
@ -2063,7 +2063,7 @@ evdns_request_transmit_to(struct evdns_request *req, struct nameserver *server)
|
|||||||
if (r < 0) {
|
if (r < 0) {
|
||||||
int err = last_error(server->socket);
|
int err = last_error(server->socket);
|
||||||
if (error_is_eagain(err)) return 1;
|
if (error_is_eagain(err)) return 1;
|
||||||
nameserver_failed(req->ns, strerror(err));
|
nameserver_failed(req->ns, tor_socket_strerror(err));
|
||||||
return 2;
|
return 2;
|
||||||
} else if (r != (ssize_t)req->request_len) {
|
} else if (r != (ssize_t)req->request_len) {
|
||||||
return 1; /* short write */
|
return 1; /* short write */
|
||||||
|
Loading…
Reference in New Issue
Block a user