1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-20 04:02:27 +00:00

Somewhere along the way of 8-CURRENT, we seem to have diverged in

functionality from other Unixen (including FreeBSD 7.0):
	NcFTP's sio library function, _SConnect, wants to select() for one
	descriptor.  It creates fd_set structures for writable fds and
	exception fds, with each fd set having only one bit set corresponding
	to the single descriptor it is selecting.  select() then returns 2,
	rather than 1.  NcFTP was checking if select returned 1, and if so,
	OK, if not 1, error.  Since 2 was returned, this was causing a problem.

Submitted by:	Mike Gleason <mgleason@ncftp.com>
This commit is contained in:
David E. O'Brien 2008-09-03 15:32:54 +00:00
parent acd4af61bc
commit 3e86864a19
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=219779
2 changed files with 12 additions and 1 deletions

View File

@ -8,7 +8,7 @@
PORTNAME= ncftp
PORTVERSION= 3.2.2
PORTREVISION?= 0
PORTREVISION?= 1
CATEGORIES= ftp ipv6
MASTER_SITES= ftp://ftp.ncftp.com/ncftp/
DISTNAME= ncftp-${PORTVERSION}-src

View File

@ -0,0 +1,11 @@
--- sio/SConnect.c.orig 2007-10-27 11:14:05.000000000 -0700
+++ sio/SConnect.c 2008-09-03 08:25:45.000000000 -0700
@@ -154,7 +154,7 @@ _SConnect(const int sfd, const struct so
tv.tv_sec = (tv_sec_t) tlen;
tv.tv_usec = 0;
result = select(sfd + 1, NULL, SELECT_TYPE_ARG234 &ss, SELECT_TYPE_ARG234 &xx, SELECT_TYPE_ARG5 &tv);
- if (result == 1) {
+ if (result >= 1) {
/* ready */
break;
} else if (result == 0) {