[前][次][番号順一覧][スレッド一覧]

ruby-changes:40552

From: usa <ko1@a...>
Date: Wed, 18 Nov 2015 10:37:46 +0900 (JST)
Subject: [ruby-changes:40552] usa:r52631 (trunk): * ext/socket/ancdata.c (bsock_recvmsg_internal): stretch the buffer size

usa	2015-11-18 10:37:34 +0900 (Wed, 18 Nov 2015)

  New Revision: 52631

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=52631

  Log:
    * ext/socket/ancdata.c (bsock_recvmsg_internal): stretch the buffer size
      when EMSGSIZE occurs on non HAVE_STRUCT_MSGHDR_MSG_CONTROL platforms
      (such as, Windows).  fixes a test error revealed by r52625.

  Modified files:
    trunk/ChangeLog
    trunk/ext/socket/ancdata.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 52630)
+++ ChangeLog	(revision 52631)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Wed Nov 18 10:33:06 2015  NAKAMURA Usaku  <usa@r...>
+
+	* ext/socket/ancdata.c (bsock_recvmsg_internal): stretch the buffer size
+	  when EMSGSIZE occurs on non HAVE_STRUCT_MSGHDR_MSG_CONTROL platforms
+	  (such as, Windows).  fixes a test error revealed by r52625.
+
 Wed Nov 18 10:12:36 2015  Eric Wong  <e@8...>
 
 	* ext/socket/ancdata.c (bsock_recvmsg_internal): use 4096 as
Index: ext/socket/ancdata.c
===================================================================
--- ext/socket/ancdata.c	(revision 52630)
+++ ext/socket/ancdata.c	(revision 52631)
@@ -1570,6 +1570,10 @@ bsock_recvmsg_internal(VALUE sock, https://github.com/ruby/ruby/blob/trunk/ext/socket/ancdata.c#L1570
             gc_done = 1;
 	    goto retry;
         }
+#else
+	if (grow_buffer && errno == EMSGSIZE)
+	    ss = (ssize_t)iov.iov_len;
+	else
 #endif
 	rb_sys_fail("recvmsg(2)");
     }

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]