[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] arma> did you get it working on win32? or just compiling



Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/tmp/cvs-serv17925/src/or

Modified Files:
	main.c 
Log Message:
<arma> did you get it working on win32? or just compiling

Index: main.c
===================================================================
RCS file: /home/or/cvsroot/src/or/main.c,v
retrieving revision 1.307
retrieving revision 1.308
diff -u -d -r1.307 -r1.308
--- main.c	22 Jul 2004 23:21:12 -0000	1.307
+++ main.c	4 Aug 2004 04:58:30 -0000	1.308
@@ -63,7 +63,7 @@
  * entry to inform the user that Tor is working. */
 int has_completed_circuit=0;
 
-#ifdef MS_WINDOWS
+#ifdef MS_WINDOWS_SERVICE
 SERVICE_STATUS service_status;
 SERVICE_STATUS_HANDLE hStatus;
 #endif
@@ -810,11 +810,12 @@
   }
 
   for(;;) {
-#ifdef MS_WINDOWS /* Do service stuff only on windows. */
-        if (service_status.dwCurrentState != SERVICE_RUNNING) {
+#ifdef MS_WINDOWS_SERVICE /* Do service stuff only on windows. */
+    if (service_status.dwCurrentState != SERVICE_RUNNING) {
       return 0;
-    }
-#else /* do signal stuff only on unix */
+    }
+#endif
+#ifndef MS_WINDOWS /* do signal stuff only on unix */
     if(please_shutdown) {
       if(!server_mode()) { /* do it now */
         log(LOG_NOTICE,"Interrupt: exiting cleanly.");
@@ -1058,7 +1059,7 @@
   crypto_global_cleanup();
 }
 
-#ifdef MS_WINDOWS
+#ifdef MS_WINDOWS_SERVICE
 void nt_service_control(DWORD request)
 {
   switch (request) {