Move request_written update back where it was for now: doing it early can cause XCBWaitForReply to wrongly believe that the request has been flushed. Eventually, we should fix bug #6021.

This commit is contained in:
Jamey Sharp 2006-02-23 14:32:11 -08:00
parent 1b83f8f8f3
commit e866bed934

View File

@ -305,9 +305,9 @@ int _xcb_out_write_block(XCBConnection *c, struct iovec *vector, size_t count)
int _xcb_out_flush(XCBConnection *c) int _xcb_out_flush(XCBConnection *c)
{ {
int ret = 1; int ret = 1;
c->out.request_written = c->out.request;
while(ret && (c->out.queue_len || c->out.vec_len)) while(ret && (c->out.queue_len || c->out.vec_len))
ret = _xcb_conn_wait(c, /*should_write*/ 1, &c->out.cond); ret = _xcb_conn_wait(c, /*should_write*/ 1, &c->out.cond);
c->out.request_written = c->out.request;
pthread_cond_broadcast(&c->out.cond); pthread_cond_broadcast(&c->out.cond);
return ret; return ret;
} }