aboutsummaryrefslogtreecommitdiff
path: root/src/or/eventdns.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2006-08-28 03:15:55 +0000
committerNick Mathewson <nickm@torproject.org>2006-08-28 03:15:55 +0000
commit54ca0387a59499f516dae689a34807dad6410b3d (patch)
treea234614bf9f15e037ca0e3e3b20cf6da0c6efcbd /src/or/eventdns.c
parentbe7054c6265f19134edc6cfef482b13e86e59cb5 (diff)
downloadtor-54ca0387a59499f516dae689a34807dad6410b3d.tar
tor-54ca0387a59499f516dae689a34807dad6410b3d.tar.gz
r8608@Kushana: nickm | 2006-08-27 16:57:47 -0400
Make it possible to change nameserver options while Tor is running. svn:r8255
Diffstat (limited to 'src/or/eventdns.c')
-rw-r--r--src/or/eventdns.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/or/eventdns.c b/src/or/eventdns.c
index 9b7586822..f3fdafa63 100644
--- a/src/or/eventdns.c
+++ b/src/or/eventdns.c
@@ -553,7 +553,7 @@ nameserver_failed(struct nameserver *const ns, const char *msg) {
global_good_nameservers--;
assert(global_good_nameservers >= 0);
if (global_good_nameservers == 0) {
- log("All nameservers have failed");
+ log(1,"All nameservers have failed");
}
ns->state = 0;
@@ -561,8 +561,8 @@ nameserver_failed(struct nameserver *const ns, const char *msg) {
evtimer_set(&ns->timeout_event, nameserver_prod_callback, ns);
if (evtimer_add(&ns->timeout_event, (struct timeval *) &global_nameserver_timeouts[0]) < 0) {
- log("Error from libevent when adding timer event for %s",
- debug_ntoa(ns->address));
+ log(1,"Error from libevent when adding timer event for %s",
+ debug_ntoa(ns->address));
// ???? Do more?
}
@@ -910,7 +910,7 @@ reply_parse(u8 *packet, int length) {
}
// XXXX do something sane with malformed A answers.
addrcount = datalength >> 2; // each IP address is 4 bytes
- addrtocopy = MIN(MAX_ADDRS - reply.data.a.addrcount, addrcount);
+ addrtocopy = MIN(MAX_ADDRS - reply.data.a.addrcount, (unsigned)addrcount);
ttl_r = MIN(ttl_r, ttl);
// we only bother with the first four addresses.
if (j + 4*addrtocopy > length) return -1;
@@ -1390,7 +1390,6 @@ eventdns_clear_nameservers_and_suspend(void)
return 0;
}
-
// exported function
int
eventdns_resume(void)