summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--win32/win32.c5
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 0fd04bbb5c..f90be81a9b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Wed Dec 15 11:03:40 2004 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * win32/win32.c (rb_w32_fdisset): check whether fd is socket.
+
Wed Dec 15 10:30:37 2004 Yukihiro Matsumoto <matz@ruby-lang.org>
* ext/openssl/ossl_digest.c (ossl_digest_initialize): [ruby-dev:25198]
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);
}
//