From 08cc60bc4175d75603ce3a452743890cfb298d52 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sun, 25 Nov 2007 12:25:08 +0100 Subject: [PATCH] Kill E_ACCEPT. --- error.h | 1 - net.c | 12 ++++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/error.h b/error.h index 07821c22..5932fdb3 100644 --- a/error.h +++ b/error.h @@ -175,7 +175,6 @@ extern const char **para_errlist[]; #define NET_ERRORS \ PARA_ERROR(SOCKET, "socket error"), \ PARA_ERROR(CONNECT, "connect error"), \ - PARA_ERROR(ACCEPT, "accept error"), \ PARA_ERROR(SETSOCKOPT, "failed to set socket options"), \ PARA_ERROR(BIND, "bind error"), \ PARA_ERROR(NAME_TOO_LONG, "name too long for struct sockaddr_un"), \ diff --git a/net.c b/net.c index f01cf583..733f7380 100644 --- a/net.c +++ b/net.c @@ -294,15 +294,15 @@ int get_stream_socket(int domain) } /** - * paraslash's wrapper around the accept system call + * Wrapper around the accept system call. * - * \param fd the listening socket - * \param addr structure which is filled in with the address of the peer socket - * \param size should contain the size of the structure pointed to by \a addr + * \param fd The listening socket. + * \param addr Structure which is filled in with the address of the peer socket. + * \param size Should contain the size of the structure pointed to by \a addr. * * Accept incoming connections on \a addr. Retry if interrupted. * - * \return The new file descriptor on success, \a -E_ACCEPT on errors. + * \return The new file descriptor on success, negative on errors. * * \sa accept(2). */ @@ -313,7 +313,7 @@ int para_accept(int fd, void *addr, socklen_t size) do new_fd = accept(fd, (struct sockaddr *) addr, &size); while (new_fd < 0 && errno == EINTR); - return new_fd < 0? -E_ACCEPT : new_fd; + return new_fd < 0? -ERRNO_TO_PARA_ERROR(errno) : new_fd; } static int setserversockopts(int socket_fd) -- 2.30.2