[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r8332: - fixed up typos in eventdns.c - configure lets user build w (in tor/trunk: . src/or)



Author: chiussi
Date: 2006-09-06 20:51:20 -0400 (Wed, 06 Sep 2006)
New Revision: 8332

Modified:
   tor/trunk/configure.in
   tor/trunk/src/or/eventdns.c
Log:
- fixed up typos in eventdns.c
- configure lets user build with eventdns on win32


Modified: tor/trunk/configure.in
===================================================================
--- tor/trunk/configure.in	2006-09-07 00:30:29 UTC (rev 8331)
+++ tor/trunk/configure.in	2006-09-07 00:51:20 UTC (rev 8332)
@@ -96,9 +96,6 @@
 
 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
 

Modified: tor/trunk/src/or/eventdns.c
===================================================================
--- tor/trunk/src/or/eventdns.c	2006-09-07 00:30:29 UTC (rev 8331)
+++ tor/trunk/src/or/eventdns.c	2006-09-07 00:51:20 UTC (rev 8332)
@@ -450,11 +450,12 @@
   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 @@
 
 	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 @@
 
 	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)