summaryrefslogtreecommitdiff
path: root/os
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2012-01-12 12:09:44 -0800
committerKeith Packard <keithp@keithp.com>2012-01-12 12:09:44 -0800
commit5b9f5c8a53aca03c3c73bc10bd362987621a9d72 (patch)
tree1d8fa318de893151eb8ec984b4d4c8322590b8d7 /os
parent5867d453cebebec6b4f10409af86b603755fbf51 (diff)
Revert "os: Hide the Connection{In,Out}put implementation details"
This reverts commit 48e7a2ef574c8b38c4f8f07b45f54c8bfd02552b. ABI change pended for 1.13
Diffstat (limited to 'os')
-rw-r--r--os/connection.c2
-rw-r--r--os/io.c19
-rw-r--r--os/osdep.h18
3 files changed, 18 insertions, 21 deletions
diff --git a/os/connection.c b/os/connection.c
index 2c90d72a9..a91501a13 100644
--- a/os/connection.c
+++ b/os/connection.c
@@ -1032,7 +1032,7 @@ CloseDownConnection(ClientPtr client)
if (FlushCallback)
CallCallbacks(&FlushCallback, NULL);
- if (oc->output)
+ if (oc->output && oc->output->count)
FlushClient(client, oc, (char *)NULL, 0);
#ifdef XDMCP
XdmcpCloseDisplay(oc->fd);
diff --git a/os/io.c b/os/io.c
index 78b7260c7..f5013d774 100644
--- a/os/io.c
+++ b/os/io.c
@@ -84,23 +84,6 @@ 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);
@@ -908,7 +891,7 @@ FlushClient(ClientPtr who, OsCommPtr oc, const void *__extraBuf, int extraCount)
long notWritten;
long todo;
- if (!oco || !oco->count)
+ if (!oco)
return 0;
written = 0;
padsize = padlength[extraCount & 3];
diff --git a/os/osdep.h b/os/osdep.h
index c9add48ee..52d2eadd9 100644
--- a/os/osdep.h
+++ b/os/osdep.h
@@ -108,8 +108,22 @@ typedef Bool (*AddAuthorFunc)(unsigned name_length, const char *name,
unsigned data_length, char *data);
#endif
-typedef struct _connectionInput *ConnectionInputPtr;
-typedef struct _connectionOutput *ConnectionOutputPtr;
+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;
struct _osComm;