unsigned int XCBGetRequestSent(XCBConnection *c)
{
- unsigned int ret;
- pthread_mutex_lock(&c->iolock);
- ret = c->out.request;
- pthread_mutex_unlock(&c->iolock);
- return ret;
+ if(c->has_error)
+ return 0;
+ return c->out.request;
}
pthread_mutex_t *XCBGetIOLock(XCBConnection *c)
{
+ if(c->has_error)
+ return 0;
return &c->iolock;
}