]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - net.c
Kill E_ACCEPT.
[paraslash.git] / net.c
diff --git a/net.c b/net.c
index f01cf5830e84eafa5e88890f5f8d9a68de4d0316..733f738031ed337e80a9e956e9bee6b23a3e8695 100644 (file)
--- 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)