CVS update [cvs1-11-x-branch]: /ccvs/src/

[email protected] 2 Jun 2005 16:48:28 -0000
Newsgroups gmane.comp.version-control.cvs.cvs
Message-ID <[email protected]>
Tag: cvs1-11-x-branch
User: dprice  
Date: 05/06/02 09:48:28

Modified:
 /ccvs/src/
  ChangeLog, sanity.sh, zlib.c

Log:
 * zlib.c (compress_buffer_shutdown_input): Don't attempt to read EOF
 from the client during shutdown.  It might never be sent.
 * sanity.sh (abspath2): Test for this.

File Changes:

Directory: /ccvs/src/
=====================

File [changed]: ChangeLog
Url: https://ccvs.cvshome.org/source/browse/ccvs/src/ChangeLog?r1=1.2336.2.378&r2=1.2336.2.379
Delta lines:  +6 -0
-------------------
--- ChangeLog	1 Jun 2005 01:23:34 -0000	1.2336.2.378
+++ ChangeLog	2 Jun 2005 16:48:19 -0000	1.2336.2.379
@@ -1,3 +1,9 @@
+2005-06-02  Derek Price  <[email protected]>
+
+	* zlib.c (compress_buffer_shutdown_input): Don't attempt to read EOF
+	from the client during shutdown.  It might never be sent.
+	* sanity.sh (abspath2): Test for this.
+
 2005-05-31  Derek Price  <[email protected]>
 	for Alexander Taler <[email protected]>
 

File [changed]: sanity.sh
Url: https://ccvs.cvshome.org/source/browse/ccvs/src/sanity.sh?r1=1.752.2.174&r2=1.752.2.175
Delta lines:  +5 -1
-------------------
--- sanity.sh	27 May 2005 18:17:02 -0000	1.752.2.174
+++ sanity.sh	2 Jun 2005 16:48:20 -0000	1.752.2.175
@@ -14440,7 +14440,11 @@
 	  # cvs checkout: warning: cannot make directory CVS in /: Permission denied
 	  # cvs [checkout aborted]: cannot make directory /foo: Permission denied
 	  # $
-	  dotest_fail abspath2-1 "${testcvs} co /foo" \
+	  #
+	  # The -z9 in this test also checks for an old server bug where the
+	  # server would block indefinitely attempting to read an EOF from the
+	  # client in the compression buffer shutdown routine.
+	  dotest_fail abspath2-1 "$testcvs -z9 co /foo" \
 "$PROG \[checkout aborted\]: Absolute module reference invalid: \`/foo'" \
 "$PROG \[server aborted\]: Absolute module reference invalid: \`/foo'
 $PROG \[checkout aborted\]: end of file from server (consult above messages if any)"

File [changed]: zlib.c
Url: https://ccvs.cvshome.org/source/browse/ccvs/src/zlib.c?r1=1.10.4.3&r2=1.10.4.4
Delta lines:  +4 -12
--------------------
--- zlib.c	20 Mar 2004 18:14:57 -0000	1.10.4.3
+++ zlib.c	2 Jun 2005 16:48:22 -0000	1.10.4.4
@@ -361,18 +361,10 @@
     struct compress_buffer *cb = (struct compress_buffer *) buf->closure;
     int zstatus;
 
-    /* Pick up any trailing data, such as the checksum.  */
-    while (1)
-    {
-	int status, nread;
-	char buf[100];
-
-	status = compress_buffer_input (cb, buf, 0, sizeof buf, &nread);
-	if (status == -1)
-	    break;
-	if (status != 0)
-	    return status;
-    }
+    /* Don't make any attempt to pick up trailing data since we are shutting
+     * down.  If the client doesn't know we are shutting down, we might not
+     * see the EOF we are expecting.
+     */
 
     zstatus = inflateEnd (&cb->zstr);
     if (zstatus != Z_OK)