[or-cvs] move network_init from or/main to common/compat
Roger Dingledine
arma at seul.org
Wed Dec 22 05:29:08 UTC 2004
Update of /home2/or/cvsroot/tor/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/tor/src/or
Modified Files:
main.c or.h
Log Message:
move network_init from or/main to common/compat
call network_init in tor-resolve.c too
move tor_lookup_hostname from common/util to common/compat
Index: main.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/main.c,v
retrieving revision 1.408
retrieving revision 1.409
diff -u -d -r1.408 -r1.409
--- main.c 22 Dec 2004 02:55:26 -0000 1.408
+++ main.c 22 Dec 2004 05:29:05 -0000 1.409
@@ -1026,25 +1026,6 @@
rend_service_dump_stats(severity);
}
-/** Called before we make any calls to network-related functions.
- * (Some operating systems require their network libraries to be
- * initialized.) */
-int network_init(void)
-{
-#ifdef MS_WINDOWS
- /* This silly exercise is necessary before windows will allow gethostbyname to work.
- */
- WSADATA WSAData;
- int r;
- r = WSAStartup(0x101,&WSAData);
- if (r) {
- log_fn(LOG_WARN,"Error initializing windows network layer: code was %d",r);
- return -1;
- }
-#endif
- return 0;
-}
-
/** Called by exit() as we shut down the process.
*/
static void exit_function(void)
Index: or.h
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/or.h,v
retrieving revision 1.509
retrieving revision 1.510
diff -u -d -r1.509 -r1.510
--- or.h 22 Dec 2004 02:32:26 -0000 1.509
+++ or.h 22 Dec 2004 05:29:06 -0000 1.510
@@ -1390,7 +1390,6 @@
void handle_signals(int is_parent);
void tor_cleanup(void);
-int network_init(void);
int tor_main(int argc, char *argv[]);
More information about the tor-commits
mailing list