[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] Make last fix work on windows too.
Update of /home/or/cvsroot/tor/src/or
In directory moria.mit.edu:/tmp/cvs-serv11463/src/or
Modified Files:
cpuworker.c dns.c
Log Message:
Make last fix work on windows too.
Index: cpuworker.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/cpuworker.c,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -d -r1.69 -r1.70
--- cpuworker.c 4 Apr 2005 21:46:08 -0000 1.69
+++ cpuworker.c 4 Apr 2005 21:53:26 -0000 1.70
@@ -272,7 +272,7 @@
crypto_free_pk_env(onion_key);
if (last_onion_key)
crypto_free_pk_env(last_onion_key);
- close(fd);
+ tor_close_socket(fd);
spawn_exit();
return 0; /* windows wants this function to return an int */
}
Index: dns.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/dns.c,v
retrieving revision 1.141
retrieving revision 1.142
diff -u -d -r1.141 -r1.142
--- dns.c 4 Apr 2005 21:46:08 -0000 1.141
+++ dns.c 4 Apr 2005 21:53:26 -0000 1.142
@@ -728,13 +728,13 @@
log_fn(LOG_INFO,"DNS worker exiting because of error on connection to Tor process.");
log_fn(LOG_INFO,"(Error on %d was %s)", fd, tor_socket_strerror(tor_socket_errno(fd)));
}
- close(fd);
+ tor_close_socket(fd);
spawn_exit();
}
if (address_len && read_all(fd, address, address_len, 1) != address_len) {
log_fn(LOG_ERR,"read hostname failed. Child exiting.");
- close(fd);
+ tor_close_socket(fd);
spawn_exit();
}
address[address_len] = 0; /* null terminate it */
@@ -761,7 +761,7 @@
set_uint32(answer+1, ip);
if (write_all(fd, answer, 5, 1) != 5) {
log_fn(LOG_ERR,"writing answer failed. Child exiting.");
- close(fd);
+ tor_close_socket(fd);
spawn_exit();
}
}