You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by co...@apache.org on 2002/05/29 00:51:11 UTC

cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/common ChannelJni.java HandlerRequest.java MsgAjp.java Shm.java

costin      02/05/28 15:51:11

  Modified:    jk/java/org/apache/jk/common ChannelJni.java
                        HandlerRequest.java MsgAjp.java Shm.java
  Log:
  Minor fixes and updates.
  
  Revision  Changes    Path
  1.11      +1 -3      jakarta-tomcat-connectors/jk/java/org/apache/jk/common/ChannelJni.java
  
  Index: ChannelJni.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/ChannelJni.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- ChannelJni.java	22 May 2002 23:52:13 -0000	1.10
  +++ ChannelJni.java	28 May 2002 22:51:11 -0000	1.11
  @@ -121,11 +121,9 @@
       public int send( Msg msg, MsgContext ep )
           throws IOException
       {
  -        int rc=super.nativeDispatch( msg, ep, JK_HANDLE_JNI_DISPATCH);
  +        int rc=super.nativeDispatch( msg, ep, JK_HANDLE_JNI_DISPATCH, 0);
           ep.setNote( receivedNote, msg );
           return rc;
  -                
  -
       }
   
       /** Receive a packet from the C side. This is called from the C
  
  
  
  1.13      +2 -0      jakarta-tomcat-connectors/jk/java/org/apache/jk/common/HandlerRequest.java
  
  Index: HandlerRequest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/HandlerRequest.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- HandlerRequest.java	10 May 2002 23:56:49 -0000	1.12
  +++ HandlerRequest.java	28 May 2002 22:51:11 -0000	1.13
  @@ -387,6 +387,8 @@
               System.exit(0);
               
   	    return OK;
  +        default:
  +            /*DEBUG*/ try {throw new Exception(); } catch(Exception ex) {ex.printStackTrace();}
   	}
   
           return OK;
  
  
  
  1.7       +1 -0      jakarta-tomcat-connectors/jk/java/org/apache/jk/common/MsgAjp.java
  
  Index: MsgAjp.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/MsgAjp.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- MsgAjp.java	27 Feb 2002 06:41:18 -0000	1.6
  +++ MsgAjp.java	28 May 2002 22:51:11 -0000	1.7
  @@ -343,6 +343,7 @@
           int max=pos;
           if( len + 4 > pos )
               max=len+4;
  +        if( max >1000 ) max=1000;
           for( int j=0; j < max; j+=16 )
               System.out.println( hexLine( buf, j, len ));
   	
  
  
  
  1.12      +3 -41     jakarta-tomcat-connectors/jk/java/org/apache/jk/common/Shm.java
  
  Index: Shm.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/Shm.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- Shm.java	9 May 2002 23:46:33 -0000	1.11
  +++ Shm.java	28 May 2002 22:51:11 -0000	1.12
  @@ -101,13 +101,9 @@
       Vector groups=new Vector();
       
       // Will be dynamic ( getMethodId() ) after things are stable 
  -    static final int SHM_SET_ATTRIBUTE=0;
       static final int SHM_WRITE_SLOT=2;
  -    static final int SHM_ATTACH=3;
  -    static final int SHM_DETACH=4;
       static final int SHM_RESET=5;
       static final int SHM_DUMP=6;
  -    static final int SHM_DESTROY=7;
       
       public Shm() {
       }
  @@ -193,18 +189,8 @@
           setNativeAttribute( "file", file );
           if( size > 0 )
               setNativeAttribute( "size", Integer.toString( size ) );
  -        attach();
  -    }
  -
  -    public void attach() throws IOException {
  -        if( apr==null ) return;
  -        MsgContext mCtx=createMsgContext();
  -        Msg msg=(Msg)mCtx.getMsg(0);
  -        msg.reset();
  -
  -        msg.appendByte( SHM_ATTACH );
           
  -        this.invoke( msg, mCtx );
  +        initJkComponent();
       }
   
       public void resetScoreboard() throws IOException {
  @@ -232,22 +218,6 @@
           this.invoke( msg, mCtx );
       }
   
  -    public void setNativeAttribute(String name, String val) throws IOException {
  -        if( apr==null ) return;
  -        MsgContext mCtx=createMsgContext();
  -        Msg msg=(Msg)mCtx.getMsg(0);
  -        C2BConverter c2b=(C2BConverter)mCtx.getNote(C2B_NOTE);
  -        msg.reset();
  -
  -        msg.appendByte( SHM_SET_ATTRIBUTE );
  -
  -        appendString( msg, name, c2b);
  -        
  -        appendString(msg, val, c2b );
  -        
  -        this.invoke( msg, mCtx );
  -    }
  -
       /** Register a tomcat instance
        *  XXX make it more flexible
        */
  @@ -316,15 +286,7 @@
       }
   
       public void destroy() throws IOException {
  -        if( apr==null ) return;
  -        
  -        MsgContext mCtx=createMsgContext();
  -        Msg msg=(Msg)mCtx.getMsg(0);
  -        msg.reset();
  -
  -        msg.appendByte( SHM_DETACH );
  -
  -        this.invoke( msg, mCtx );
  +        destroyJkComponent();
       }
   
       
  @@ -333,7 +295,7 @@
       {
           if( apr==null ) return 0;
           log.debug("ChannelShm.invoke: "  + ep );
  -        super.nativeDispatch( msg, ep, JK_HANDLE_SHM_DISPATCH );
  +        super.nativeDispatch( msg, ep, JK_HANDLE_SHM_DISPATCH, 0 );
           return 0;
       }    
   
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>