aboutsummaryrefslogtreecommitdiff
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
parent5a8563baedd55062305094637d9701b2cf52abde (diff)
downloadtor-91d7ad660fc5e8ad6637742b670c4d248300f2cb.tar.gz
tor-91d7ad660fc5e8ad6637742b670c4d248300f2cb.zip
- fixed up typos in eventdns.c
- configure lets user build with eventdns on win32 svn:r8332
-rw-r--r--configure.in3
-rw-r--r--src/or/eventdns.c13
2 files changed, 8 insertions, 8 deletions
diff --git a/configure.in b/configure.in
index 3dc4c6ca31..d3f2654a83 100644
--- a/configure.in
+++ b/configure.in
@@ -96,9 +96,6 @@ if test $bwin32 = true; then
AC_DEFINE(MS_WINDOWS,1, [Define to 1 if we are building for a Windows platform.])
-if test $eventdns = true; then
-AC_MSG_ERROR([tor+eventdns not yet supported on Windows.])
-fi
fi
diff --git a/src/or/eventdns.c b/src/or/eventdns.c
index 780a5412c1..9f1a82e6f2 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)