[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r6971: Patch from Frediano Ziglio: Windows compilation fixes on eve (tor/trunk/src/or)
- To: or-cvs@xxxxxxxxxxxxx
- Subject: [or-cvs] r6971: Patch from Frediano Ziglio: Windows compilation fixes on eve (tor/trunk/src/or)
- From: nickm@xxxxxxxx
- Date: Thu, 3 Aug 2006 03:46:26 -0400 (EDT)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Thu, 03 Aug 2006 03:46:34 -0400
- Reply-to: or-talk@xxxxxxxxxxxxx
- Sender: owner-or-cvs@xxxxxxxxxxxxx
Author: nickm
Date: 2006-08-03 03:46:25 -0400 (Thu, 03 Aug 2006)
New Revision: 6971
Modified:
tor/trunk/src/or/eventdns.c
Log:
Patch from Frediano Ziglio: Windows compilation fixes on eventdns.c.
Modified: tor/trunk/src/or/eventdns.c
===================================================================
--- tor/trunk/src/or/eventdns.c 2006-08-03 04:23:45 UTC (rev 6970)
+++ tor/trunk/src/or/eventdns.c 2006-08-03 07:46:25 UTC (rev 6971)
@@ -1186,8 +1186,8 @@
if (ns->socket < 0) { err = 1; goto out1; }
#ifdef MS_WINDOWS
{
- int nonblocking = 1;
- ioctlsocket(socket, FIONBIO, (unsigned long*) &nonblocking);
+ u_long nonblocking = 1;
+ ioctlsocket(ns->socket, FIONBIO, &nonblocking);
}
#else
fcntl(ns->socket, F_SETFL, O_NONBLOCK);
@@ -1223,7 +1223,11 @@
return 0;
out2:
+#ifdef MS_WINDOWS
+ closesocket(ns->socket);
+#else
close(ns->socket);
+#endif
out1:
free(ns);
return err;