Conrad T. Pino wrote:

>This patch stops the hang with :pserver: for version, status & update
>commands.  See notes below.
>  
>

I committed the attached instead.  Does it work for you?

Regards,

Derek

-- 
Derek R. Price
CVS Solutions Architect
Ximbiot <http://ximbiot.com>
v: +1 717.579.6168
f: +1 717.234.3125
<mailto:[EMAIL PROTECTED]>

Index: src/socket-client.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/socket-client.c,v
retrieving revision 1.16
diff -u -p -r1.16 socket-client.c
--- src/socket-client.c 24 Sep 2005 23:57:02 -0000      1.16
+++ src/socket-client.c 25 Sep 2005 00:01:00 -0000
@@ -91,6 +91,8 @@ socket_buffer_input (void *closure, char
        blocking mode normally waits until all the requested data is
        available.  */
 
+    assert (size >= need);
+
     *got = 0;
 
     do
@@ -106,7 +108,7 @@ socket_buffer_input (void *closure, char
           makes sure that we only recv() BUFFER_DATA_SIZE bytes at
           a time.  */
 
-       nbytes = recv (sb->socket, data, size, 0);
+       nbytes = recv (sb->socket, data + *got, size - *got, 0);
        if (nbytes < 0)
            error (1, 0, "reading from server: %s",
                   SOCK_STRERROR (SOCK_ERRNO));
@@ -121,12 +123,9 @@ socket_buffer_input (void *closure, char
            else
                return 0;
        }
-       need -= nbytes;
-       size -= nbytes;
-       data += nbytes;
        *got += nbytes;
     }
-    while (need > 0);
+    while (*got < need);
 
     return 0;
 }
_______________________________________________
Bug-cvs mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/bug-cvs

Reply via email to