There is a couple of bugs in jk_nt_service.c when using the ajp12 protocol
which causes tomcat to be shutdown with extreme prejudice instead of waiting
for it to be shutdown via the ajp12 shutdown message.  Basically the bug is
that the variable "rc" is defined in an outer code block and then defined
and used again in the code block dealing with the ajp12 shutdown.  The local
"rc" variable hides the outer "rc" variable, which is then check for
shutdown status.  I've fixed this problem and tested it and I've included a
patch file.

--- jk_nt_service.c.old Mon Oct 30 16:14:06 2000
+++ jk_nt_service.c     Tue Oct 31 20:29:30 2000
@@ -670,13 +670,13 @@
                 }                                                    
             } else {
                 char b[] = {(char)254, (char)15};
-                int rc = send(sd, b, 2, 0);
+                rc = send(sd, b, 2, 0);
                 if(2 == rc) {
                     rc = JK_TRUE;
                 }
             }
             jk_close_socket(sd);
-            if(2 == rc) {
+            if(JK_TRUE == rc) {
                 if(WAIT_OBJECT_0 == WaitForSingleObject(hTomcat, 30*1000)) {
                     return;
                 }

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to