diff options
author | Jamey Sharp <jamey@minilop.net> | 2006-02-22 23:38:16 -0800 |
---|---|---|
committer | Jamey Sharp <jamey@minilop.net> | 2006-02-22 23:38:16 -0800 |
commit | f8a8b465e080faf5479c0b38dc67cc9b9ae24927 (patch) | |
tree | f5c52fa635e7761786dd1ec0e9918d634ff1870d /src/xcb_out.c | |
parent | e0a35783837e0d4974cfa20c6a7a073698f3b0a5 (diff) |
Bugfix: move request_written update *before* _xcb_conn_wait in _xcb_out_flush. Otherwise a reply may be read before we record that we have sent the request, and then XCB gets... confused.
Diffstat (limited to 'src/xcb_out.c')
-rw-r--r-- | src/xcb_out.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/xcb_out.c b/src/xcb_out.c index 80d7108..0afabc2 100644 --- a/src/xcb_out.c +++ b/src/xcb_out.c @@ -269,9 +269,9 @@ int _xcb_out_write_block(XCBConnection *c, struct iovec *vector, size_t count) int _xcb_out_flush(XCBConnection *c) { int ret = 1; + c->out.request_written = c->out.request; while(ret > 0 && (c->out.queue_len || c->out.vec_len)) ret = _xcb_conn_wait(c, /*should_write*/ 1, &c->out.cond); - c->out.request_written = c->out.request; pthread_cond_broadcast(&c->out.cond); return ret; } |