[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 28/30: Turn EADDRNOTAVAIL to more commonly-understood ECONNREFUSE
From: |
Samuel Thibault |
Subject: |
[hurd] 28/30: Turn EADDRNOTAVAIL to more commonly-understood ECONNREFUSED |
Date: |
Tue, 22 Sep 2015 21:52:00 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch upstream
in repository hurd.
commit 51f60c38c8d3cae7b0d75ba51eab5af47f6b5df7
Author: Samuel Thibault <address@hidden>
Date: Sat Sep 12 14:08:17 2015 +0200
Turn EADDRNOTAVAIL to more commonly-understood ECONNREFUSED
Thanks Svante Signell for the investigation.
* pflocal/socket.c (S_socket_connect, S_socket_send): When addr_get_sock
returns EADDRNOTAVAIL, translate into ECONNREFUSED.
---
pflocal/socket.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/pflocal/socket.c b/pflocal/socket.c
index 792c637..5844904 100644
--- a/pflocal/socket.c
+++ b/pflocal/socket.c
@@ -92,7 +92,10 @@ S_socket_connect (struct sock_user *user, struct addr *addr)
return EOPNOTSUPP;
err = addr_get_sock (addr, &peer);
- if (!err)
+ if (err == EADDRNOTAVAIL)
+ /* The server went away. */
+ err = ECONNREFUSED;
+ else if (!err)
{
struct sock *sock = user->sock;
struct connq *cq = peer->listen_queue;
@@ -295,6 +298,9 @@ S_socket_send (struct sock_user *user, struct addr
*dest_addr, int flags,
if (dest_addr)
{
err = addr_get_sock (dest_addr, &dest_sock);
+ if (err == EADDRNOTAVAIL)
+ /* The server went away. */
+ err = ECONNREFUSED;
if (err)
return err;
if (sock->pipe_class != dest_sock->pipe_class)
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/hurd.git
- [hurd] 24/30: Fix closure of local server sockets, (continued)
- [hurd] 24/30: Fix closure of local server sockets, Samuel Thibault, 2015/09/22
- [hurd] 23/30: Fix sock_bind(sock,NULL) support, Samuel Thibault, 2015/09/22
- [hurd] 29/30: Define TIME_VALUE_TO_TIMESPEC only when not defined already, Samuel Thibault, 2015/09/22
- [hurd] 25/30: Fix detection of terminated dgram pflocal server, Samuel Thibault, 2015/09/22
- [hurd] 01/30: exec: fix setting the name of early servers, Samuel Thibault, 2015/09/22
- [hurd] 12/30: libdiskfs: rename `error' variable, Samuel Thibault, 2015/09/22
- [hurd] 26/30: Add support for ANSI.SYS SCP/RCP escape codes, Samuel Thibault, 2015/09/22
- [hurd] 27/30: Fix build warning, Samuel Thibault, 2015/09/22
- [hurd] 14/30: Fix race condition in ext2fs when remounting, Samuel Thibault, 2015/09/22
- [hurd] 30/30: Merge remote-tracking branch 'upstream/master' into upstream, Samuel Thibault, 2015/09/22
- [hurd] 28/30: Turn EADDRNOTAVAIL to more commonly-understood ECONNREFUSED,
Samuel Thibault <=