From 91d7ad660fc5e8ad6637742b670c4d248300f2cb Mon Sep 17 00:00:00 2001 From: Mike Chiussi Date: Thu, 7 Sep 2006 00:51:20 +0000 Subject: [PATCH] - fixed up typos in eventdns.c - configure lets user build with eventdns on win32 svn:r8332 --- configure.in | 3 --- src/or/eventdns.c | 13 ++++++++----- 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)