summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-12-15 02:06:26 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-12-15 02:06:26 +0000
commit9ccc9cfaf3edbf4ce5be9317f402e5d0b48256fd (patch)
tree07128278f9adf2a3f5887d2f82111ba48690c6d4 /win32
parent83413f0304138ae1d5359c07418dadb797c281d9 (diff)
* win32/win32.c (rb_w32_fdisset): check whether fd is socket.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'win32')
-rw-r--r--win32/win32.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/win32/win32.c b/win32/win32.c
index 1a859a5a3f..53f8dc9c25 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -1811,7 +1811,10 @@ rb_w32_fdclr(int fd, fd_set *set)
int
rb_w32_fdisset(int fd, fd_set *set)
{
- return __WSAFDIsSet(TO_SOCKET(fd), set);
+ SOCKET s = TO_SOCKET(fd);
+ if (!is_socket(s))
+ return 0;
+ return __WSAFDIsSet(s, set);
}
//