aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/os/io.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-01-11 08:18:52 +0100
committermarha <marha@users.sourceforge.net>2012-01-11 08:18:52 +0100
commit38e661c7d82fa0b34fbe9b3f3261295787bb6427 (patch)
treeef71c86cfe741318555e06dec3e9e2817d731e7a /xorg-server/os/io.c
parenta1e97828c89278770cb249039ec92d959440c640 (diff)
downloadvcxsrv-38e661c7d82fa0b34fbe9b3f3261295787bb6427.tar.gz
vcxsrv-38e661c7d82fa0b34fbe9b3f3261295787bb6427.tar.bz2
vcxsrv-38e661c7d82fa0b34fbe9b3f3261295787bb6427.zip
mesa pixman xserver git update 11 jan 2012
Diffstat (limited to 'xorg-server/os/io.c')
-rw-r--r--xorg-server/os/io.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/xorg-server/os/io.c b/xorg-server/os/io.c
index ebb821653..78b7260c7 100644
--- a/xorg-server/os/io.c
+++ b/xorg-server/os/io.c
@@ -84,6 +84,23 @@ SOFTWARE.
CallbackListPtr ReplyCallback;
CallbackListPtr FlushCallback;
+typedef struct _connectionInput {
+ struct _connectionInput *next;
+ char *buffer; /* contains current client input */
+ char *bufptr; /* pointer to current start of data */
+ int bufcnt; /* count of bytes in buffer */
+ int lenLastReq;
+ int size;
+ unsigned int ignoreBytes; /* bytes to ignore before the next request */
+} ConnectionInput, *ConnectionInputPtr;
+
+typedef struct _connectionOutput {
+ struct _connectionOutput *next;
+ unsigned char *buf;
+ int size;
+ int count;
+} ConnectionOutput, *ConnectionOutputPtr;
+
static ConnectionInputPtr AllocateInputBuffer(void);
static ConnectionOutputPtr AllocateOutputBuffer(void);
@@ -112,6 +129,8 @@ static OsCommPtr AvailableInput = (OsCommPtr)NULL;
((xBigReq *)(req))->length)
#define MAX_TIMES_PER 10
+#define BUFSIZE 4096
+#define BUFWATERMARK 8192
/*
* A lot of the code in this file manipulates a ConnectionInputPtr:
@@ -889,7 +908,7 @@ FlushClient(ClientPtr who, OsCommPtr oc, const void *__extraBuf, int extraCount)
long notWritten;
long todo;
- if (!oco)
+ if (!oco || !oco->count)
return 0;
written = 0;
padsize = padlength[extraCount & 3];