Hi, Attached patch fix a bug on Win32, if call apr_recvfrom() when no one write to that addr:port, the call returns 730022(WSAEINVAL) instead of blocking as expected.
The reason is that the from->salen was not initialized properly. The patch fix the problem. I tested on Windows XP home with apr-0.9.6. Cheers, -- Henry Jen, a.k.a slowhog
Index: network_io/win32/sendrecv.c
===================================================================
--- network_io/win32/sendrecv.c (revision 154383)
+++ network_io/win32/sendrecv.c (working copy)
@@ -189,6 +189,7 @@
{
apr_ssize_t rv;
+ from->salen = sizeof(from->sa);
rv = recvfrom(sock->socketdes, buf, (int)*len, flags,
(struct sockaddr*)&from->sa, &from->salen);
if (rv == SOCKET_ERROR) {
signature.asc
Description: This is a digitally signed message part
