Author: mturk
Date: Mon Jul 18 06:38:00 2011
New Revision: 1147758

URL: http://svn.apache.org/viewvc?rev=1147758&view=rev
Log:
Fix local flags

Modified:
    commons/sandbox/runtime/trunk/src/main/native/os/unix/inetsock.c
    commons/sandbox/runtime/trunk/src/main/native/os/unix/localsock.c

Modified: commons/sandbox/runtime/trunk/src/main/native/os/unix/inetsock.c
URL: 
http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/unix/inetsock.c?rev=1147758&r1=1147757&r2=1147758&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/unix/inetsock.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/unix/inetsock.c Mon Jul 18 
06:38:00 2011
@@ -312,6 +312,7 @@ ACR_NET_EXPORT(jlong, SocketServerEndpoi
 {
     int sd;
     int ad;
+    int rc = 0;
     acr_sockaddr_t  aa;
     socklen_t       aalen;
     acr_sd_t *fd  = J2P(fp, acr_sd_t *);
@@ -349,7 +350,7 @@ ACR_NET_EXPORT(jlong, SocketServerEndpoi
     }
 #if !HAVE_ACCEPT4
     {
-        int rc = AcrCloseOnExec(sd, 1);
+        rc = AcrCloseOnExec(sd, 1);
         if (rc != 0) {
             r_close(sd);
             ACR_THROW_NET_ERROR(rc);
@@ -369,7 +370,6 @@ ACR_NET_EXPORT(jlong, SocketServerEndpoi
     }
 #endif
     if (block == JNI_FALSE) {
-        int rc = 0;
 #if O_NONBLOCK_INHERITED
         if (!ACR_HASFLAG(fd, ACR_SO_NONBLOCK))
 #endif

Modified: commons/sandbox/runtime/trunk/src/main/native/os/unix/localsock.c
URL: 
http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/unix/localsock.c?rev=1147758&r1=1147757&r2=1147758&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/unix/localsock.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/unix/localsock.c Mon Jul 
18 06:38:00 2011
@@ -123,6 +123,7 @@ ACR_NET_EXPORT(jlong, LocalServerEndpoin
 {
     int sd;
     int ad;
+    int rc = 0;
     acr_sockaddr_t  aa;
     socklen_t       aalen;
     acr_sd_t *fd  = J2P(fp, acr_sd_t *);
@@ -155,7 +156,7 @@ ACR_NET_EXPORT(jlong, LocalServerEndpoin
     }
 #if !HAVE_ACCEPT4
     {
-        int rc = AcrCloseOnExec(sd, 1);
+        rc = AcrCloseOnExec(sd, 1);
         if (rc != 0) {
             r_close(sd);
             ACR_THROW_NET_ERROR(rc);
@@ -164,7 +165,6 @@ ACR_NET_EXPORT(jlong, LocalServerEndpoin
     }
 #endif
     if (block == JNI_FALSE) {
-        int rc = 0;
 #if O_NONBLOCK_INHERITED
         if (!ACR_HASFLAG(fd, ACR_SO_NONBLOCK))
 #endif


Reply via email to