]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug #1064: Application error running Squid from command line on Windows XP SP2
authorhno <>
Sat, 25 Sep 2004 04:01:17 +0000 (04:01 +0000)
committerhno <>
Sat, 25 Sep 2004 04:01:17 +0000 (04:01 +0000)
patch by Guido.

src/win32.cc

index d80d16381acbe9f1a4299ebaa7240cacd8fcfdf1..0b8325855969eb10bc11774bccb5cae6ba3fc45b 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: win32.cc,v 1.10 2003/08/03 21:02:41 robertc Exp $
+ * $Id: win32.cc,v 1.11 2004/09/24 22:01:17 hno Exp $
  *
  * * * * * * * * Legal stuff * * * * * * *
  *
@@ -373,9 +373,11 @@ WIN32_Exit()
 {
 #if USE_WIN32_SERVICE
 
-    if (!Squid_Aborting) {
-        svcStatus.dwCurrentState = SERVICE_STOPPED;
-        SetServiceStatus(svcHandle, &svcStatus);
+    if (WIN32_run_mode == _WIN_SQUID_RUN_MODE_SERVICE) {
+        if (!Squid_Aborting) {
+            svcStatus.dwCurrentState = SERVICE_STOPPED;
+            SetServiceStatus(svcHandle, &svcStatus);
+        }
     }
 
 #endif