]> git.pld-linux.org Git - packages/cvs.git/blame - cvs-fixed_buffer.patch
rel 20; rediff patches
[packages/cvs.git] / cvs-fixed_buffer.patch
CommitLineData
99aab3da
AM
1--- cvs/src/buffer.h.org 2007-11-05 20:50:00.611456571 +0100
2+++ cvs/src/buffer.h 2007-11-05 20:50:11.485304127 +0100
3@@ -16,6 +16,8 @@
4
5 #if defined (SERVER_SUPPORT) || defined (CLIENT_SUPPORT)
6
7+# include <unistd.h>
8+
9 # include "getpagesize.h"
10
11 /*
00408d4e
MM
12diff -ur cvs-1.11.1p1.orig/src/buffer.c cvs-1.11.1p1/src/buffer.c
13--- cvs-1.11.1p1.orig/src/buffer.c Thu Apr 19 21:29:05 2001
14+++ cvs-1.11.1p1/src/buffer.c Thu Feb 14 13:22:23 2002
00408d4e
MM
15@@ -292,15 +293,28 @@
16
17 if (nbytes != data->size)
18 {
19+ struct buffer_data *p;
20+ int cnt;
21+
22 /* Not all the data was written out. This is only
23 permitted in nonblocking mode. Adjust the buffer,
24 and return. */
25
26 assert (buf->nonblocking);
27
28+ cnt = 0;
29+ for (p = data; p->next; p = p->next)
30+ cnt++;
31+
32 data->size -= nbytes;
33 data->bufp += nbytes;
34
35+ /* Don't allow buffers to grow over 100 pages. */
36+ if (cnt > 100) {
37+ usleep(100000);
38+ continue;
39+ }
40+
41 return 0;
42 }
43 }
This page took 0.103468 seconds and 4 git commands to generate.