diff options
| author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-12-15 02:06:26 +0000 |
|---|---|---|
| committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-12-15 02:06:26 +0000 |
| commit | 138db76b8d4485de1384437bd7da44c30088e8e3 (patch) | |
| tree | 07128278f9adf2a3f5887d2f82111ba48690c6d4 | |
| parent | 01aa92a75e92425d7940f5d731ec2ca9b2b0fe61 (diff) | |
| download | ruby-138db76b8d4485de1384437bd7da44c30088e8e3.tar.gz ruby-138db76b8d4485de1384437bd7da44c30088e8e3.tar.xz ruby-138db76b8d4485de1384437bd7da44c30088e8e3.zip | |
* win32/win32.c (rb_w32_fdisset): check whether fd is socket.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@7558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 4 | ||||
| -rw-r--r-- | win32/win32.c | 5 |
2 files changed, 8 insertions, 1 deletions
@@ -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 1a859a5a3..53f8dc9c2 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); } // |
