[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r11425: remove yet more pointless differences between our eventdns.c (in tor/trunk: . src/or)
Author: nickm
Date: 2007-09-11 16:17:18 -0400 (Tue, 11 Sep 2007)
New Revision: 11425
Modified:
tor/trunk/
tor/trunk/src/or/eventdns.c
Log:
r15022@catbus: nickm | 2007-09-10 10:31:54 -0400
remove yet more pointless differences between our eventdns.c and the evdns.c in libevent.
Property changes on: tor/trunk
___________________________________________________________________
svk:merge ticket from /tor/trunk [r15022] on 8246c3cf-6607-4228-993b-4d95d33730f1
Modified: tor/trunk/src/or/eventdns.c
===================================================================
--- tor/trunk/src/or/eventdns.c 2007-09-11 14:10:20 UTC (rev 11424)
+++ tor/trunk/src/or/eventdns.c 2007-09-11 20:17:18 UTC (rev 11425)
@@ -755,7 +755,7 @@
}
}
-static int
+static INLINE int
name_parse(u8 *packet, int length, int *idx, char *name_out, int name_out_len) {
int name_end = -1;
int j = *idx;
@@ -775,7 +775,7 @@
for(;;) {
u8 label_len;
- //if (j >= length) return -1;
+ if (j >= length) return -1;
GET8(label_len);
if (!label_len) break;
if (label_len & 0xc0) {
@@ -1693,8 +1693,8 @@
r = sendto(port->socket, req->response, req->response_len, 0,
(struct sockaddr*) &req->addr, req->addrlen);
if (r<0) {
- int e = last_error(port->socket);
- if (! error_is_eagain(e))
+ int err = last_error(port->socket);
+ if (! error_is_eagain(err))
return -1;
if (port->pending_replies) {
@@ -1877,9 +1877,9 @@
evdns_request_transmit_to(struct request *req, struct nameserver *server) {
const int r = send(server->socket, req->request, req->request_len, 0);
if (r < 0) {
- int e = last_error(server->socket);
- if (error_is_eagain(e)) return 1;
- nameserver_failed(req->ns, strerror(e));
+ int err = last_error(server->socket);
+ if (error_is_eagain(err)) return 1;
+ nameserver_failed(req->ns, strerror(err));
return 2;
} else if (r != (int)req->request_len) {
return 1; /* short write */