X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=net.c;h=4a6f9a63cd8475f8e7a0f583be3ac7e3d205c1a7;hb=08471ab23c0abdf0ddd7ff836a15bd81fbce7520;hp=91200fc040bcfebafccf9e737fb65514af9ff8f2;hpb=6bded356ec89b1344049ff702e6c6babaeccd439;p=paraslash.git diff --git a/net.c b/net.c index 91200fc0..4a6f9a63 100644 --- a/net.c +++ b/net.c @@ -288,7 +288,7 @@ struct flowopts *flowopt_new(void) { struct flowopts *new = para_malloc(sizeof(*new)); - INIT_LIST_HEAD(&new->sockopts); + init_list_head(&new->sockopts); return new; } @@ -801,25 +801,21 @@ int recv_buffer(int fd, char *buf, size_t size) * Wrapper around the accept system call. * * \param fd The listening socket. - * \param rfds An optional fd_set pointer. * \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 new_fd Result pointer. * - * Accept incoming connections on \a addr, retry if interrupted. If \a rfds is - * not \p NULL, return 0 if \a fd is not set in \a rfds without calling accept(). + * Accept incoming connections on addr, retry if interrupted. * * \return Negative on errors, zero if no connections are present to be accepted, * one otherwise. * * \sa accept(2). */ -int para_accept(int fd, fd_set *rfds, void *addr, socklen_t size, int *new_fd) +int para_accept(int fd, void *addr, socklen_t size, int *new_fd) { int ret; - if (rfds && !FD_ISSET(fd, rfds)) - return 0; do ret = accept(fd, (struct sockaddr *) addr, &size); while (ret < 0 && errno == EINTR);