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

ruby-changes:40585

From: usa <ko1@a...>
Date: Thu, 19 Nov 2015 14:16:25 +0900 (JST)
Subject: [ruby-changes:40585] usa:r52664 (trunk): * win32/win32.c (finish_overlapped_socket): return value of this

usa	2015-11-19 14:16:13 +0900 (Thu, 19 Nov 2015)

  New Revision: 52664

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

  Log:
    * win32/win32.c (finish_overlapped_socket): return value of this
      function should be only 0 or SOCKET_ERROR.

  Modified files:
    trunk/ChangeLog
    trunk/win32/win32.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 52663)
+++ ChangeLog	(revision 52664)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Thu Nov 19 14:14:37 2015  NAKAMURA Usaku  <usa@r...>
+
+	* win32/win32.c (finish_overlapped_socket): return value of this
+	  function should be only 0 or SOCKET_ERROR.
+
 Thu Nov 19 14:12:12 2015  Nobuyoshi Nakada  <nobu@r...>
 
 	* compile.c (iseq_tailcall_optimize): apply tail call optimization
Index: win32/win32.c
===================================================================
--- win32/win32.c	(revision 52663)
+++ win32/win32.c	(revision 52664)
@@ -3269,15 +3269,17 @@ finish_overlapped_socket(BOOL input, SOC https://github.com/ruby/ruby/blob/trunk/win32/win32.c#L3269
 		result = WSAGetOverlappedResult(s, wol, &size, TRUE, &flg)
 		);
 	    if (result) {
+		result = 0;
 		*len = size;
 		break;
 	    }
+	    result = SOCKET_ERROR;
 	    /* thru */
 	  default:
 	    if ((err = WSAGetLastError()) == WSAECONNABORTED && !input)
 		errno = EPIPE;
 	    else if (err == WSAEMSGSIZE && input) {
-		result = TRUE;
+		result = 0;
 		*len = size;
 		break;
 	    }

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

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