Re: [cp-patches] FYI: Fix timeout on accepted sockets

2006-05-14 Thread Mark Wielaard
On Sun, 2006-05-14 at 22:06 +0200, Mark Wielaard wrote:
> +  // Reset the inherited timeout
> +  TARGET_NATIVE_NETWORK_SOCKET_SET_OPTION_SO_TIMEOUT (newfd, 0, result);

Woops. Now --enable-Werror will fail even on the release branch. Sorry
about that. Fixed as follows:

2006-05-14  Mark Wielaard  <[EMAIL PROTECTED]>

* native/jni/java-net/javanet.c (_javanet_accept): Don't use C++
comments.

Committed,

Mark

diff -u -r1.33.6.1 javanet.c
--- native/jni/java-net/javanet.c   14 May 2006 20:07:51 -  
1.33.6.1+++ native/jni/java-net/javanet.c   14 May 2006 20:27:02 -
@@ -835,7 +835,7 @@
 }
   while (result != TARGET_NATIVE_OK);

-  // Reset the inherited timeout
+  /* Reset the inherited timeout. */
   TARGET_NATIVE_NETWORK_SOCKET_SET_OPTION_SO_TIMEOUT (newfd, 0, result);

   /* Populate instance variables */



signature.asc
Description: This is a digitally signed message part


[cp-patches] FYI: Fix timeout on accepted sockets

2006-05-14 Thread Mark Wielaard
Hi,

This fixes an issue with timeouts on accepted sockets. Since we aren't
using select for timeouts accepted sockets inherit the timeout value of
their ServerSocket. This patch resets the timeout to zero.

2006-05-14  Mark Wielaard  <[EMAIL PROTECTED]>

PR 27459
* native/jni/java-net/javanet.c (_javanet_accept): Reset the
inherited timeout on socket.

I also added a Mauve test for this.

Committed to trunk and release branch.

Cheers,

Mark

diff -u -r1.33 javanet.c
--- native/jni/java-net/javanet.c   6 Feb 2006 07:53:38 -   1.33
+++ native/jni/java-net/javanet.c   14 May 2006 20:01:57 -
@@ -835,6 +835,9 @@
 }
   while (result != TARGET_NATIVE_OK);

+  // Reset the inherited timeout
+  TARGET_NATIVE_NETWORK_SOCKET_SET_OPTION_SO_TIMEOUT (newfd, 0, result);
+
   /* Populate instance variables */
   _javanet_set_int_field (env, impl, "gnu/java/net/PlainSocketImpl",
  "native_fd", newfd);



signature.asc
Description: This is a digitally signed message part