[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] move network_init to compat.c from main.c
Update of /home2/or/cvsroot/tor/src/or
In directory moria.mit.edu:/home2/arma/work/onion/0091/tor/src/or
Modified Files:
Tag: tor-0_0_9-patches
main.c or.h
Log Message:
move network_init to compat.c from main.c
so we can call it from tor-resolve.c
Index: main.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/main.c,v
retrieving revision 1.407.2.9
retrieving revision 1.407.2.10
diff -u -d -r1.407.2.9 -r1.407.2.10
--- main.c 4 Feb 2005 00:56:23 -0000 1.407.2.9
+++ main.c 4 Feb 2005 07:16:13 -0000 1.407.2.10
@@ -1037,25 +1037,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.508.2.11
retrieving revision 1.508.2.12
diff -u -d -r1.508.2.11 -r1.508.2.12
--- or.h 4 Feb 2005 05:29:13 -0000 1.508.2.11
+++ or.h 4 Feb 2005 07:16:13 -0000 1.508.2.12
@@ -1395,7 +1395,6 @@
void handle_signals(int is_parent);
void tor_cleanup(void);
-int network_init(void);
int tor_main(int argc, char *argv[]);