aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Chiussi <chiussi@gmail.com>2006-09-07 00:51:20 +0000
committerMike Chiussi <chiussi@gmail.com>2006-09-07 00:51:20 +0000
commit91d7ad660fc5e8ad6637742b670c4d248300f2cb (patch)
treec74b663beec638643656c63849ba2e6aa7657b20 /src
parent5a8563baedd55062305094637d9701b2cf52abde (diff)
downloadtor-91d7ad660fc5e8ad6637742b670c4d248300f2cb.tar
tor-91d7ad660fc5e8ad6637742b670c4d248300f2cb.tar.gz
- fixed up typos in eventdns.c
- configure lets user build with eventdns on win32 svn:r8332
Diffstat (limited to 'src')
-rw-r--r--src/or/eventdns.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/or/eventdns.c b/src/or/eventdns.c
index 780a5412c..9f1a82e6f 100644
--- a/src/or/eventdns.c
+++ b/src/or/eventdns.c
@@ -450,11 +450,12 @@ inet_aton(const char *c, struct in_addr *addr)
if (strcmp(c, "255.255.255.255") == 0) {
addr->s_addr = 0xffffffffu;
} else {
- uint32_t r = inet_addr(c);
+ r = inet_addr(c);
if (r == INADDR_NONE)
return 0;
- addr->a_addr = r;
+ addr->s_addr = r;
}
+ return 1;
}
#define CLOSE_SOCKET(x) closesocket(x)
#else
@@ -2062,7 +2063,9 @@ load_nameservers_with_getnetworkparams(void)
if (!(handle = LoadLibrary("iphlpapi.dll")))
goto done;
- if (!(fn = GetProcAddress(handle, "GetNetworkParams")))
+ if (!(fn =
+ (DWORD (WINAPI*)(FIXED_INFO*,DWORD*))
+ GetProcAddress(handle, "GetNetworkParams")))
goto done;
buf = malloc(size);
@@ -2084,12 +2087,12 @@ load_nameservers_with_getnetworkparams(void)
assert(fixed);
added_any = 0;
- ns = fixed->DnsServerList;
+ ns = &(fixed->DnsServerList);
while (ns) {
r = eventdns_nameserver_ip_add_line(ns->IpAddress.String);
if (r) { status = r; goto done; }
added_any = 0;
- ns = ns->next;
+ ns = ns->Next;
}
if (!added_any)