Index: lib/sockunion.c =================================================================== RCS file: /var/cvsroot/quagga/lib/sockunion.c,v retrieving revision 1.4 diff -u -r1.4 sockunion.c --- lib/sockunion.c 8 May 2004 05:10:38 -0000 1.4 +++ lib/sockunion.c 6 Sep 2004 09:01:59 -0000 @@ -317,10 +317,13 @@ return buf; } -/* sockunion_connect returns - -1 : error occured - 0 : connect success - 1 : connect is in progress */ +/* sockunion_connect: nonblock connect to remote host + * returns + * -1 : error occured + * 0 : connect success + * 1 : connect is in progress + * socket will have O_NONBLOCK set. + */ enum connect_result sockunion_connect (int fd, union sockunion *peersu, unsigned short port, unsigned int ifindex) @@ -367,7 +370,6 @@ /* Immediate success */ if (ret == 0) { - fcntl (fd, F_SETFL, val); return connect_success; } @@ -381,8 +383,6 @@ return connect_error; } } - - fcntl (fd, F_SETFL, val); return connect_in_progress; }