tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cos...@apache.org
Subject cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/common ChannelUn.java JniHandler.java
Date Sun, 26 May 2002 07:13:59 GMT
costin      02/05/26 00:13:59

  Modified:    jk/java/org/apache/jk/common ChannelUn.java JniHandler.java
  Log:
  Update the unix socket channel.
  
  Make sure the endpoint is initialized ( thanks Nacho )
  
  Revision  Changes    Path
  1.18      +6 -9      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.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- ChannelUn.java	25 Apr 2002 23:13:24 -0000	1.17
  +++ ChannelUn.java	26 May 2002 07:13:59 -0000	1.18
  @@ -113,10 +113,9 @@
       int isNote=2;
       int osNote=3;
       AprImpl apr;
  -    long gPool;
       
       public void accept( MsgContext ep ) throws IOException {
  -        long l= apr.unAccept(gPool, unixListenSocket);
  +        long l= apr.unAccept(unixListenSocket);
           /* We could create a real java.net.Socket, or a UnixSocket, etc
            */
           ep.setNote( socketNote, new Long( l ) );
  @@ -150,8 +149,6 @@
           }
   
           tp=new ThreadPool();
  -        if( log.isDebugEnabled() ) log.debug( "Creating pool " + gPool );
  -        gPool=apr.poolCreate( 0 );
   
           File socketFile=new File( file );
           if( socketFile.exists() ) {
  @@ -159,7 +156,7 @@
               if (!socketFile.delete())
                     throw(new IOException("Cannot remove " + file));
           }
  -        unixListenSocket=apr.unSocketListen( gPool, file, 10 );
  +        unixListenSocket=apr.unSocketListen( file, 10 );
           if (unixListenSocket<0)
               throw(new IOException("Cannot create listening socket " + file));
   
  @@ -178,7 +175,7 @@
       public void close(MsgContext ep) throws IOException {
           if( apr==null ) return;
           Long s=(Long)ep.getNote( socketNote );
  -        apr.unSocketClose(gPool, s.longValue(),3);
  +        apr.unSocketClose(s.longValue(),3);
       }
   
       public void destroy() throws IOException {
  @@ -188,7 +185,7 @@
                   tp.shutdown();
               
               if(apr !=null ) 
  -                apr.unSocketClose(gPool, unixListenSocket,3);
  +                apr.unSocketClose( unixListenSocket,3);
           } catch(Exception e) {
               e.printStackTrace();
           }
  @@ -205,7 +202,7 @@
   
           Long s=(Long)ep.getNote( socketNote );
   
  -        apr.unWrite( gPool, s.longValue(), buf, 0, len );
  +        apr.unWrite(  s.longValue(), buf, 0, len );
           return len;
       }
   
  @@ -285,7 +282,7 @@
           int got;
   
           while(pos < len) {
  -            got=apr.unRead( gPool, s.longValue(),
  +            got=apr.unRead( s.longValue(),
                               b, pos + offset, len - pos);
   
               if (log.isDebugEnabled()) {
  
  
  
  1.5       +1 -0      jakarta-tomcat-connectors/jk/java/org/apache/jk/common/JniHandler.java
  
  Index: JniHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/JniHandler.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- JniHandler.java	9 May 2002 23:46:33 -0000	1.4
  +++ JniHandler.java	26 May 2002 07:13:59 -0000	1.5
  @@ -173,6 +173,7 @@
           msgCtx.setJniEnv( xEnv );
   
           long epP=apr.createJkHandler(xEnv, "endpoint");
  +        apr.jkInit( xEnv, epP );
           msgCtx.setJniContext( epP );
   
       }
  
  
  

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message