X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=afs.c;h=6286806013471ea55278593d0cbf2de74f8934b7;hp=b83fa23d87b1cd75ad971b2056a6a88ef39c9c65;hb=8dab386f87d2998fd26126600ca7faf56d5a35d1;hpb=50fac71430f5993560d40eb5044d45d8255d7ca6 diff --git a/afs.c b/afs.c index b83fa23d..62868060 100644 --- a/afs.c +++ b/afs.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2009 Andre Noll + * Copyright (C) 2007-2010 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -930,14 +930,11 @@ static void command_post_select(struct sched *s, struct task *t) free(client); } /* Accept connections on the local socket. */ - if (!FD_ISSET(ct->fd, &s->rfds)) - return; - ret = para_accept(ct->fd, &unix_addr, sizeof(unix_addr)); - if (ret < 0) { + ret = para_accept(ct->fd, &s->rfds, &unix_addr, sizeof(unix_addr), &fd); + if (ret < 0) PARA_NOTICE_LOG("%s\n", para_strerror(-ret)); + if (ret <= 0) return; - } - fd = ret; ret = mark_fd_nonblocking(fd); if (ret < 0) { PARA_NOTICE_LOG("%s\n", para_strerror(-ret));