diff options
author | Jamey Sharp <jamey@minilop.net> | 2006-09-15 01:09:27 -0700 |
---|---|---|
committer | Jamey Sharp <jamey@minilop.net> | 2006-09-21 15:18:57 -0700 |
commit | 7f71bf9c0f30536e85907b2c991cb7001861e1d3 (patch) | |
tree | d8c3587b5b3851cf9df9b8555e11acd3581d2743 /src/xcb_out.c | |
parent | 0aa96bfc7abe18889cd85bfaa05b05d53e572bb1 (diff) |
Make all public functions do nothing on an error connection.
Diffstat (limited to 'src/xcb_out.c')
-rw-r--r-- | src/xcb_out.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/xcb_out.c b/src/xcb_out.c index 56e02f7..91f7ea1 100644 --- a/src/xcb_out.c +++ b/src/xcb_out.c @@ -59,6 +59,8 @@ static int write_block(XCBConnection *c, struct iovec *vector, int count) CARD32 XCBGetMaximumRequestLength(XCBConnection *c) { + if(c->has_error) + return 0; pthread_mutex_lock(&c->out.reqlenlock); if(!c->out.maximum_request_length) { @@ -91,6 +93,9 @@ unsigned int XCBSendRequest(XCBConnection *c, int flags, struct iovec *vector, c int veclen = req->count; enum workarounds workaround = WORKAROUND_NONE; + if(c->has_error) + return 0; + assert(c != 0); assert(vector != 0); assert(req->count > 0); @@ -200,6 +205,8 @@ unsigned int XCBSendRequest(XCBConnection *c, int flags, struct iovec *vector, c int XCBFlush(XCBConnection *c) { int ret; + if(c->has_error) + return 0; pthread_mutex_lock(&c->iolock); ret = _xcb_out_flush_to(c, c->out.request); pthread_mutex_unlock(&c->iolock); |