Revert "os: Hide the Connection{In,Out}put implementation details"

This reverts commit 48e7a2ef57.

ABI change pended for 1.13
This commit is contained in:
Keith Packard 2012-01-12 12:09:44 -08:00
parent 5867d453ce
commit 5b9f5c8a53
3 changed files with 18 additions and 21 deletions

View File

@ -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);

19
os/io.c
View File

@ -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];

View File

@ -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;