Stefan,
Thanks for looking into this, but this bug has already been fixed in the 32
branch under cvs. If you check out the most recent version of tomcat_32, or
if you download 3.2.2b1, you can see that jk_sockbuf.c has been cleaned up
(Brian Vetter contributed the patch).
Thanks, though,
-Dan
p.s. For future patches, it would be very, very helpful if you could:
a) Use cvs diff -u, to get the diffs in the "unified" format, which patch
can read.
b) Attach your patches to your emails rather than pasting them in -- they
are much less likely to get mangled by email readers.
[EMAIL PROTECTED] wrote:
>
> These changes fixes the following problem:
> When using ajp12 with mod_jk, httpd procesess handling a request
> will hang, using all cpu time, if tomcat is shut down before the headers
> of the request have been sent from tomcat.
>
> BR,
> Stefan Åberg
>
> ***
> /usr/local/src/apache/jakarta-tomcat-3.2.1-src/src/native/jk/jk_sockbuf.c
> Tue Mar 6 10:10:40 2001
> --- jk_sockbuf.c Tue Mar 6 10:15:54 2001
> ***************
> *** 131,137 ****
>
> if(sb->end == sb->start) {
> sb->end = sb->start = 0;
> ! if(!fill_buffer(sb)) {
> return JK_FALSE;
> }
> }
> --- 131,137 ----
>
> if(sb->end == sb->start) {
> sb->end = sb->start = 0;
> ! if(fill_buffer(sb) < 0) {
> return JK_FALSE;
> }
> }
> ***************
> *** 169,175 ****
> return JK_TRUE;
> }
> }
> ! if(!fill_buffer(sb)) {
> return JK_FALSE;
> }
> }
> --- 169,175 ----
> return JK_TRUE;
> }
> }
> ! if(fill_buffer(sb) <= 0 ) {
> return JK_FALSE;
> }
> }
> ***************
> *** 205,215 ****
> SOCKBUF_SIZE - sb->end, 0);
>
> if(ret < 0) {
> ! return JK_FALSE;
> }
>
> sb->end += ret;
>
> ! return JK_TRUE;
> }
> -
> --- 205,214 ----
> SOCKBUF_SIZE - sb->end, 0);
>
> if(ret < 0) {
> ! return ret;
> }
>
> sb->end += ret;
>
> ! return ret;
> }
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
--
Dan Milstein // [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]