aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/os/io.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-01-11 08:55:02 +0100
committermarha <marha@users.sourceforge.net>2012-01-11 08:57:05 +0100
commita73c45b7c72c6e426e1c75dd939f5481227b6979 (patch)
treeaba5ced82f492a7e28dfa683144dfbd6293d9613 /xorg-server/os/io.c
parentd60b5206a10c9d547a7230a991593b516e412204 (diff)
parent38e661c7d82fa0b34fbe9b3f3261295787bb6427 (diff)
downloadvcxsrv-a73c45b7c72c6e426e1c75dd939f5481227b6979.tar.gz
vcxsrv-a73c45b7c72c6e426e1c75dd939f5481227b6979.tar.bz2
vcxsrv-a73c45b7c72c6e426e1c75dd939f5481227b6979.zip
Merge remote-tracking branch 'origin/released'
Conflicts: pixman/pixman/pixman-trap.c xorg-server/Xext/xace.c xorg-server/dix/dispatch.c xorg-server/hw/xwin/winclipboardthread.c xorg-server/hw/xwin/winengine.c xorg-server/hw/xwin/winwin32rootlesswindow.c xorg-server/include/dixstruct.h xorg-server/os/connection.c
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 8a2207081..ad549c534 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];