From: Danny van Bruggen Date: 2002-09-12T04:49:30+09:00 Subject: Re: UDPSocket bug? The other message I sent had a reasonable winsock error for some reason: 10040. winsock2.h tells me #define WSABASEERR 10000 #define WSAEMSGSIZE (WSABASEERR+40) then we get http://mail.python.org/pipermail/patches/2001-February/004072.html which states that I did a recv but the datagram was too big for my buffer. That's right. Linux didn't feel that was an error though. And, something has changed between Ruby 1.6.6 and 1.7.2 that shouldn't have been changed... 1. Behaviour of Linux and Windows has been different in all version I have 2. 1.7 looks at the wrong errorcode. There must be someone with a compiler and sourcetree set up for fixing :) Danny > On Wed, Sep 11, 2002 at 05:37:40AM +0900, Paul Brannan wrote: > > On Wed, Sep 11, 2002 at 04:04:50AM +0900, Danny van Bruggen wrote: > > > [BUG] rb_sys_fail() - errno == 0 > > > > Hmm, I wonder if Winsock isn't setting errno properly. If that's the > > case, then rb_sys_fail() won't be sufficient for socket.c. > > According to http://www.sockets.com/a_c2.htm (and a few other sources), > meaningful winsock error information cannot be obtained from errno; > WSAGetLastError() should be used instead. In this situation, > rb_sys_fail won't work. > > If I actually had a compiler installed on Windows, I'd write a patch, > but this should be an easy fix anyway. > > This explains why the code was failing with such a strange error > message; I wonder why it was failing in the first place, though. > > Paul >