diff options
author | Olivier Fourdan <ofourdan@redhat.com> | 2019-06-25 14:59:59 +0200 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2023-03-19 17:55:51 +0000 |
commit | 9ae32feef793082a302e65d31514a958604c761d (patch) | |
tree | 7649c742f82b3c1ba2c57ada17d0a5da06907a26 | |
parent | c761c6505d49e8381a3eae94f2e5e118cbdf6487 (diff) |
Allow partial connection to succeed
Xwayland can optionally be socket-activated by the Wayland compositor,
in which case it would use only the sockets provided by the compositor.
However, that prevents other transport protocols from working, because
when it's given a socket from the Wayland compositor, it would disable
all other connections and rely solely on the given socket.
Change `MakeAllCOTSServerListeners` to allow for partial connections so
that if `partial` is set to a non-zero value by the caller, we do not
bail out in the address is already in use.
That allows to continue trying with other protocols even if the local
connection fails (as this is already handled by the socket from the
Wayland compositor).
Related: https://gitlab.freedesktop.org/xorg/xserver/issues/817
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
-rw-r--r-- | Xtrans.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -1170,6 +1170,9 @@ TRANS(MakeAllCOTSServerListeners) (const char *port, int *partial, if ((status = TRANS(CreateListener (ciptr, port, flags))) < 0) { + if (*partial != 0) + continue; + if (status == TRANS_ADDR_IN_USE) { /* |