diff options
author | Arvind Umrao <arvind.umrao@oracle.com> | 2011-11-04 15:42:05 +0530 |
---|---|---|
committer | Julien Danjou <julien@danjou.info> | 2012-01-11 18:01:29 +0100 |
commit | 769acff0da8b9859ebdf052dce80045465c7598c (patch) | |
tree | da557d02c65a7f3ba8dfd73284c0300f780593a1 /src/xcbint.h | |
parent | 9b4d6f30a339e2d18ebaea98149da81aba453216 (diff) |
Added more error states and removed global error_connection
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=41443
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=42304
I have added more xcb connection error states at xcb.h header.
Also I have removed global error_connection variable, and added
an interface that returns connection error state.
TBD:
I will segregate errors states in a separate header file and try to
provide more precise error states, in future. Also I will give patch
for libX11, in that patch xcb_connection_t::has_error will be passed
to default io handler of libX11. This value can then be used for
displaying error messages.
Reviewed-by: Rami Ylimäki <rami.ylimaki@vincit.fi>
Reviewed-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Arvind Umrao <arvind.umrao@oracle.com>
Diffstat (limited to 'src/xcbint.h')
-rw-r--r-- | src/xcbint.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/xcbint.h b/src/xcbint.h index 096576c..f9e5a52 100644 --- a/src/xcbint.h +++ b/src/xcbint.h @@ -174,8 +174,6 @@ void _xcb_ext_destroy(xcb_connection_t *c); /* xcb_conn.c */ -extern const int error_connection; - struct xcb_connection_t { int has_error; @@ -193,7 +191,10 @@ struct xcb_connection_t { _xcb_xid xid; }; -void _xcb_conn_shutdown(xcb_connection_t *c); +void _xcb_conn_shutdown(xcb_connection_t *c, int err); + +xcb_connection_t *_xcb_conn_ret_error(int err); + int _xcb_conn_wait(xcb_connection_t *c, pthread_cond_t *cond, struct iovec **vector, int *count); |