X-Git-Url: http://git.demorecorder.com/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fxcb_out.c;h=04b8365fd561a6c3be319138fbe9a8ba2ac13474;hb=662479760c42fc38c458381ee3eaed92e2c8b733;hp=80d71086a8409bf092fa3495aad26debbad12b2b;hpb=a7d749ec3fd3303a4e7ace9d4f0f1672f9310ef2;p=free-sw%2Fxcb%2Flibxcb diff --git a/src/xcb_out.c b/src/xcb_out.c index 80d7108..04b8365 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; - 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; + while(ret && (c->out.queue_len || c->out.vec_len)) + ret = _xcb_conn_wait(c, /*should_write*/ 1, &c->out.cond); pthread_cond_broadcast(&c->out.cond); return ret; }