diff options
author | Mattias Andrée <maandree@kth.se> | 2020-06-15 15:25:17 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2020-06-15 15:25:17 +0200 |
commit | 629b5ab9f3f03f54fb115d169ed2bbe666f2799f (patch) | |
tree | f863eb25c0672123d48523b9b3a76e046a3873e3 /libaxl_connect_without_handshake.c | |
parent | Misc, mainly connect stuff (diff) | |
download | libaxl-629b5ab9f3f03f54fb115d169ed2bbe666f2799f.tar.gz libaxl-629b5ab9f3f03f54fb115d169ed2bbe666f2799f.tar.bz2 libaxl-629b5ab9f3f03f54fb115d169ed2bbe666f2799f.tar.xz |
libaxl_receive_handshake and libaxl_send_request
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r-- | libaxl_connect_without_handshake.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libaxl_connect_without_handshake.c b/libaxl_connect_without_handshake.c index 181cdb2..e05dd66 100644 --- a/libaxl_connect_without_handshake.c +++ b/libaxl_connect_without_handshake.c @@ -62,6 +62,7 @@ libaxl_connect_without_handshake(const char *host, const char *protocol, int dis if ((!protocol || !*protocol) && (!host || !*host)) { sprintf(path, "/tmp/.X11-unix/X%i", display); fd = connect_unix(path); + /* TODO also try abstract address version with a NUL byte before it (truncate address to remove tailing NULs) */ if (fd < 0) { fd = connect_tcp_ip("localhost", display); if (fd >= 0) @@ -88,7 +89,7 @@ libaxl_connect_without_handshake(const char *host, const char *protocol, int dis conn = libaxl_create(fd); if (conn) - conn->info.default_screen_number = screen; + conn->info.default_screen_number = screen < 0 ? 0 : screen; return conn; } |