summaryrefslogtreecommitdiff
path: root/Xtranssock.c
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@herrb.eu>2022-07-01 12:04:26 +0200
committerMatthieu Herrb <matthieu@herrb.eu>2022-07-01 12:04:26 +0200
commit495fa1b46b2937e199052e1e40a2a2072dd11888 (patch)
treecf4c6036e52ef9569518149fc832f00b5f4b1755 /Xtranssock.c
parent8cc0c865acafe588d3026bc6099f79dc46ffe7fb (diff)
parent3309c75906a56de86607f59481304b3a2812162f (diff)
Merge remote-tracking branch 'origin/master' into obsd
Diffstat (limited to 'Xtranssock.c')
-rw-r--r--Xtranssock.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/Xtranssock.c b/Xtranssock.c
index 166a377..59b2924 100644
--- a/Xtranssock.c
+++ b/Xtranssock.c
@@ -611,12 +611,19 @@ TRANS(SocketOpenCOTSServer) (Xtransport *thistrans, const char *protocol,
break;
}
if (i < 0) {
- if (i == -1)
- prmsg (1,"SocketOpenCOTSServer: Unable to open socket for %s\n",
- thistrans->TransName);
- else
+ if (i == -1) {
+ if (errno == EAFNOSUPPORT) {
+ thistrans->flags |= TRANS_NOLISTEN;
+ prmsg (1,"SocketOpenCOTSServer: Socket for %s unsupported on this system.\n",
+ thistrans->TransName);
+ } else {
+ prmsg (1,"SocketOpenCOTSServer: Unable to open socket for %s\n",
+ thistrans->TransName);
+ }
+ } else {
prmsg (1,"SocketOpenCOTSServer: Unable to determine socket type for %s\n",
thistrans->TransName);
+ }
return NULL;
}