const XCBSetup *XCBGetSetup(XCBConnection *c)
{
+ if(c->has_error)
+ return 0;
/* doesn't need locking because it's never written to. */
return c->setup;
}
int XCBGetFileDescriptor(XCBConnection *c)
{
+ if(c->has_error)
+ return -1;
/* doesn't need locking because it's never written to. */
return c->fd;
}
void XCBDisconnect(XCBConnection *c)
{
- if(!c)
+ if(c->has_error)
return;
free(c->setup);
/* Private interface */
+void _xcb_conn_shutdown(XCBConnection *c)
+{
+ c->has_error = 1;
+}
+
int _xcb_conn_wait(XCBConnection *c, pthread_cond_t *cond, struct iovec **vector, int *count)
{
int ret;