aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/os/io.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-10-08 09:06:44 +0200
committermarha <marha@users.sourceforge.net>2012-10-08 09:06:44 +0200
commit9b15e1cfe4c6ca9862c2865c4adbc21a758e9734 (patch)
tree13452621f70604f08fd91b1bd46ed6341dbc2ea7 /xorg-server/os/io.c
parentbd13c464f728719fceb8a4918b52727ec125ea6e (diff)
parentde8397bc3d010bba24ec0c4d2e6249a769a86fc7 (diff)
downloadvcxsrv-9b15e1cfe4c6ca9862c2865c4adbc21a758e9734.tar.gz
vcxsrv-9b15e1cfe4c6ca9862c2865c4adbc21a758e9734.tar.bz2
vcxsrv-9b15e1cfe4c6ca9862c2865c4adbc21a758e9734.zip
Merge remote-tracking branch 'origin/released'
* origin/released: pixman libxcb mesa xserver xkeyboard-config git update 8 oct 2012 Conflicts: xorg-server/Xext/xf86bigfont.c xorg-server/dix/dispatch.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.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/xorg-server/os/io.c b/xorg-server/os/io.c
index 9ccfdba62..8bb54ff74 100644
--- a/xorg-server/os/io.c
+++ b/xorg-server/os/io.c
@@ -82,6 +82,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;
+
+typedef struct _connectionOutput {
+ struct _connectionOutput *next;
+ unsigned char *buf;
+ int size;
+ int count;
+} ConnectionOutput;
+
static ConnectionInputPtr AllocateInputBuffer(void);
static ConnectionOutputPtr AllocateOutputBuffer(void);
@@ -846,10 +863,13 @@ FlushClient(ClientPtr who, OsCommPtr oc, const void *__extraBuf, int extraCount)
long todo;
if (!oco)
- return 0;
+ return 0;
written = 0;
padsize = padding_for_int32(extraCount);
notWritten = oco->count + extraCount + padsize;
+ if (!notWritten)
+ return 0;
+
todo = notWritten;
while (notWritten) {
long before = written; /* amount of whole thing written */