jfclere     02/01/14 01:36:13

  Modified:    jk/java/org/apache/jk/common ChannelUn.java
               jk/native2 build.xml
               jk/native2/jni jk_jni_aprImpl.c
  Log:
  The file used by the socket was removed twice (in java and native code).
  I have commented out the removal in the native code (more things in java ;-))
  
  Revision  Changes    Path
  1.3       +5 -1      
jakarta-tomcat-connectors/jk/java/org/apache/jk/common/ChannelUn.java
  
  Index: ChannelUn.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/ChannelUn.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ChannelUn.java    12 Jan 2002 04:03:42 -0000      1.2
  +++ ChannelUn.java    14 Jan 2002 09:36:13 -0000      1.3
  @@ -140,9 +140,13 @@
   
           File socketFile=new File( file );
           if( socketFile.exists() ) {
  -            socketFile.delete();
  +            // The socket file cannot be removed ...
  +            if (!socketFile.delete())
  +                  throw(new IOException("Cannot remove " + file));
           }
           unixListenSocket=apr.unSocketListen( gPool, file, 10 );
  +        if (unixListenSocket<0)
  +            throw(new IOException("Cannot create listening socket"));
   
           // Run a thread that will accept connections.
           tp.start();
  
  
  
  1.12      +1 -1      jakarta-tomcat-connectors/jk/native2/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/build.xml,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- build.xml 12 Jan 2002 05:25:08 -0000      1.11
  +++ build.xml 14 Jan 2002 09:36:13 -0000      1.12
  @@ -6,8 +6,8 @@
     
     <property file="${user.home}/.ant.properties" />
     <property file="${user.home}/build.properties" />
  -  <property file="../build.properties" />
     <property file="build.properties" />
  +  <property file="../build.properties" />
   
     <!-- ========== Local paths, overriden in build.properties ========== -->
   
  
  
  
  1.5       +2 -1      jakarta-tomcat-connectors/jk/native2/jni/jk_jni_aprImpl.c
  
  Index: jk_jni_aprImpl.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/jni/jk_jni_aprImpl.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- jk_jni_aprImpl.c  12 Jan 2002 05:25:09 -0000      1.4
  +++ jk_jni_aprImpl.c  14 Jan 2002 09:36:13 -0000      1.5
  @@ -202,10 +202,11 @@
       strcpy(unixAddr.sun_path, host);
       (*jniEnv)->ReleaseStringUTFChars(jniEnv, hostJ, host);
   
  -    // remove the exist socket.
  +    /* remove the exist socket. (it had been moved in ChannelUn.java).
       if (unlink(unixAddr.sun_path) < 0 && errno != ENOENT) {
           // The socket cannot be remove... Well I hope that no problems ;-)
       }
  +     */
   
       unixSocket = socket(AF_UNIX, SOCK_STREAM, 0);
       if (unixSocket<0) {
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to