From 38e661c7d82fa0b34fbe9b3f3261295787bb6427 Mon Sep 17 00:00:00 2001 From: marha Date: Wed, 11 Jan 2012 08:18:52 +0100 Subject: mesa pixman xserver git update 11 jan 2012 --- xorg-server/os/io.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'xorg-server/os/io.c') 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]; -- cgit v1.2.3