[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] Document the rest of main.c
Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/tmp/cvs-serv16034/src/or
Modified Files:
main.c
Log Message:
Document the rest of main.c
Index: main.c
===================================================================
RCS file: /home/or/cvsroot/src/or/main.c,v
retrieving revision 1.256
retrieving revision 1.257
diff -u -d -r1.256 -r1.257
--- main.c 5 May 2004 21:32:43 -0000 1.256
+++ main.c 5 May 2004 21:35:12 -0000 1.257
@@ -772,6 +772,8 @@
#endif /* signal stuff */
}
+/* Write all statistics to the log, with log level 'severity'. Called
+ * in response to a SIGUSR1. */
static void dumpstats(int severity) {
int i;
connection_t *conn;
@@ -826,6 +828,9 @@
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
@@ -843,6 +848,8 @@
return 0;
}
+/* Called by exit() as we shut down the process.
+ */
void exit_function(void)
{
#ifdef MS_WINDOWS
@@ -850,6 +857,8 @@
#endif
}
+/* Main entry point for the Tor command-line client.
+ */
int tor_main(int argc, char *argv[]) {
/* give it somewhere to log to initially */