summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-05-22 15:14:54 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-05-22 15:14:54 +0000
commit28f4cbf5b92a875f3dc8b47de885037cab7b7437 (patch)
tree289ff56cf0666a2b76ca06f4a5ba3dcbad2a719d
parent3a2d6ccff498d5296a671ce52937dcc0e2149fc9 (diff)
merge -c 12137
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_5@12312 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rw-r--r--ext/socket/socket.c4
-rw-r--r--version.h10
3 files changed, 13 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 3b3a4dfea7f..cf1d060c3b1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Wed May 23 00:06:19 2007 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * ext/socket/socket.c (s_recv, s_recvfrom): some systems (such as
+ windows) doesn't set fromlen if the socket is connection-oriented.
+ reported by Bram Whillock in [ruby-core:10512] [ruby-Bugs#9061]
+
Tue Mar 20 15:37:24 2007 URABE Shyouhei <shyouhei@ruby-lang.org>
* distruby.rb: Add zip generation.
diff --git a/ext/socket/socket.c b/ext/socket/socket.c
index 963f8e2d82b..5c91c390ec5 100644
--- a/ext/socket/socket.c
+++ b/ext/socket/socket.c
@@ -594,7 +594,7 @@ s_recvfrom(sock, argc, argv, from)
rb_raise(rb_eTypeError, "sockaddr size differs - should not happen");
}
#endif
- if (alen) /* OSX doesn't return a 'from' result from recvfrom for connection-oriented sockets */
+ if (alen && alen != sizeof(buf)) /* OSX doesn't return a 'from' result from recvfrom for connection-oriented sockets */
return rb_assoc_new(str, ipaddr((struct sockaddr*)buf));
else
return rb_assoc_new(str, Qnil);
@@ -660,7 +660,7 @@ s_recvfrom_nonblock(VALUE sock, int argc, VALUE *argv, enum sock_recv_type from)
return str;
case RECV_IP:
- if (alen) /* connection-oriented socket may not return a from result */
+ if (alen && alen != sizeof(buf)) /* connection-oriented socket may not return a from result */
addr = ipaddr((struct sockaddr*)buf);
break;
diff --git a/version.h b/version.h
index a2ebd089237..ef0c05ac822 100644
--- a/version.h
+++ b/version.h
@@ -1,15 +1,15 @@
#define RUBY_VERSION "1.8.5"
-#define RUBY_RELEASE_DATE "2007-03-19"
+#define RUBY_RELEASE_DATE "2007-05-23"
#define RUBY_VERSION_CODE 185
-#define RUBY_RELEASE_CODE 20070319
-#define RUBY_PATCHLEVEL 39
+#define RUBY_RELEASE_CODE 20070523
+#define RUBY_PATCHLEVEL 40
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 8
#define RUBY_VERSION_TEENY 5
#define RUBY_RELEASE_YEAR 2007
-#define RUBY_RELEASE_MONTH 3
-#define RUBY_RELEASE_DAY 19
+#define RUBY_RELEASE_MONTH 5
+#define RUBY_RELEASE_DAY 23
#ifdef RUBY_EXTERN
RUBY_EXTERN const char ruby_version[];