Refactor auth code to get display number from xcb_connect
authorJosh Triplett <josh@freedesktop.org>
Tue, 21 Nov 2006 07:25:41 +0000 (23:25 -0800)
committerJosh Triplett <josh@freedesktop.org>
Tue, 21 Nov 2006 07:28:03 +0000 (23:28 -0800)
commitd6abe93b06c421b78e92d76ceb5ca181e3adff31
tree60d6e94cc49d4f376be3632eb8e5a4668113f5cc
parent4a928de402a6e69886921fe428bbffb909c6405e
Refactor auth code to get display number from xcb_connect

Change xcb_connect to pass the display number to _xcb_get_auth_info, which
passes it to get_authptr.  This allows get_authptr to stop hacking the display
number out of the sockaddrs of various address families, such as
port - X_TCP_PORT, or the number after the last X in the UNIX socket path. This
also removes a portability bug introduced during the IPv6 changes: relying on
'\0'-termination of the UNIX socket path in a sockaddr_un.

Commit by Jamey Sharp and Josh Triplett.
src/xcb_auth.c
src/xcb_util.c
src/xcbint.h