pier 01/07/12 19:51:52 Modified: webapp configure.in webapp/java WarpConfigurationHandler.java WarpConnection.java WarpConnector.java WarpPacket.java Log: Sources cleanup (don't even want to _touch_ the issue of tab vs. spaces) Revision Changes Path 1.16 +29 -29 jakarta-tomcat-connectors/webapp/configure.in Index: configure.in =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/webapp/configure.in,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- configure.in 2001/07/13 02:06:29 1.15 +++ configure.in 2001/07/13 02:51:36 1.16 @@ -1,40 +1,40 @@ dnl ========================================================================= -dnl -dnl The Apache Software License, Version 1.1 -dnl -dnl Copyright (c) 1999-2001 The Apache Software Foundation. -dnl All rights reserved. -dnl +dnl +dnl The Apache Software License, Version 1.1 +dnl +dnl Copyright (c) 1999-2001 The Apache Software Foundation. +dnl All rights reserved. +dnl dnl ========================================================================= -dnl +dnl dnl Redistribution and use in source and binary forms, with or without modi- -dnl fication, are permitted provided that the following conditions are met: -dnl +dnl fication, are permitted provided that the following conditions are met: +dnl dnl 1. Redistributions of source code must retain the above copyright notice -dnl notice, this list of conditions and the following disclaimer. -dnl +dnl notice, this list of conditions and the following disclaimer. +dnl dnl 2. Redistributions in binary form must reproduce the above copyright dnl notice, this list of conditions and the following disclaimer in the -dnl documentation and/or other materials provided with the distribution. -dnl +dnl documentation and/or other materials provided with the distribution. +dnl dnl 3. The end-user documentation included with the redistribution, if any, -dnl must include the following acknowlegement: -dnl +dnl must include the following acknowlegement: +dnl dnl "This product includes software developed by the Apache Software -dnl Foundation <http://www.apache.org/>." -dnl +dnl Foundation <http://www.apache.org/>." +dnl dnl Alternately, this acknowlegement may appear in the software itself, if -dnl and wherever such third-party acknowlegements normally appear. -dnl +dnl and wherever such third-party acknowlegements normally appear. +dnl dnl 4. The names "The Jakarta Project", "Apache WebApp Module", and "Apache dnl Software Foundation" must not be used to endorse or promote products dnl derived from this software without prior written permission. For -dnl written permission, please contact <[EMAIL PROTECTED]>. -dnl +dnl written permission, please contact <[EMAIL PROTECTED]>. +dnl dnl 5. Products derived from this software may not be called "Apache" nor may dnl "Apache" appear in their names without prior written permission of the -dnl Apache Software Foundation. -dnl +dnl Apache Software Foundation. +dnl dnl THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES dnl INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY dnl AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL @@ -45,20 +45,20 @@ dnl HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, dnl STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN dnl ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -dnl POSSIBILITY OF SUCH DAMAGE. -dnl +dnl POSSIBILITY OF SUCH DAMAGE. +dnl dnl ========================================================================= -dnl +dnl dnl This software consists of voluntary contributions made by many indivi- dnl duals on behalf of the Apache Software Foundation. For more information -dnl on the Apache Software Foundation, please see <http://www.apache.org/>. -dnl +dnl on the Apache Software Foundation, please see <http://www.apache.org/>. +dnl dnl ========================================================================= dnl -------------------------------------------------------------------------- dnl Author Pier Fumagalli <mailto:[EMAIL PROTECTED]> dnl Author Jon S. Stevens <mailto:[EMAIL PROTECTED]> -dnl Version $Id: configure.in,v 1.15 2001/07/13 02:06:29 pier Exp $ +dnl Version $Id: configure.in,v 1.16 2001/07/13 02:51:36 pier Exp $ dnl -------------------------------------------------------------------------- dnl -------------------------------------------------------------------------- 1.2 +4 -4 jakarta-tomcat-connectors/webapp/java/WarpConfigurationHandler.java Index: WarpConfigurationHandler.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/webapp/java/WarpConfigurationHandler.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- WarpConfigurationHandler.java 2001/07/13 02:15:41 1.1 +++ WarpConfigurationHandler.java 2001/07/13 02:51:41 1.2 @@ -11,20 +11,20 @@ public WarpConfigurationHandler() { super(); } - + public boolean handle(WarpConnection connection) throws IOException { WarpPacket packet=new WarpPacket(); - + // Prepare the Welcome packet packet.setType(Constants.TYPE_CONF_WELCOME); packet.writeUnsignedShort(Constants.VERS_MAJOR); packet.writeUnsignedShort(Constants.VERS_MINOR); packet.writeInteger(-1); connection.send(packet); - + return(true); //while (true) { // connection.recv(packet); } -} +} 1.10 +6 -6 jakarta-tomcat-connectors/webapp/java/WarpConnection.java Index: WarpConnection.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/webapp/java/WarpConnection.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- WarpConnection.java 2001/07/13 02:15:41 1.9 +++ WarpConnection.java 2001/07/13 02:51:43 1.10 @@ -10,7 +10,7 @@ import org.apache.catalina.LifecycleListener; public class WarpConnection implements LifecycleListener, Runnable { - + /* ==================================================================== */ /* Instance variables */ /* ==================================================================== */ @@ -34,7 +34,7 @@ private Socket socket=null; /** The connector instance. */ private WarpConnector connector=null; - + /* ==================================================================== */ /* Constructor */ /* ==================================================================== */ @@ -126,7 +126,7 @@ this.input=this.socket.getInputStream(); this.output=this.socket.getOutputStream(); boolean success=new WarpConfigurationHandler().handle(this); - + this.stop(); } catch (IOException e) { this.getConnector().log(this,"Exception on socket",e); @@ -142,7 +142,7 @@ /** * Send a WARP packet over this connection. - */ + */ public void send(WarpPacket packet) throws IOException { if (Constants.DEBUG) @@ -157,9 +157,9 @@ this.output.flush(); packet.reset(); } - + /** * Receive a WARP packet over this connection. - */ + */ } 1.11 +7 -7 jakarta-tomcat-connectors/webapp/java/WarpConnector.java Index: WarpConnector.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/webapp/java/WarpConnector.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- WarpConnector.java 2001/07/13 02:14:25 1.10 +++ WarpConnector.java 2001/07/13 02:51:44 1.11 @@ -96,7 +96,7 @@ */ public void setContainer(Container container) { this.container=container; - + if (Constants.DEBUG) { if (container==null) this.debug(this,"Setting null container"); else this.debug(this,"Setting container "+container.getClass()); @@ -326,7 +326,7 @@ if (started) throw new LifecycleException("Already started"); lifecycle.fireLifecycleEvent(START_EVENT, null); - + this.started = true; this.thread=new Thread(this); @@ -342,7 +342,7 @@ lifecycle.fireLifecycleEvent(STOP_EVENT, null); this.started = false; - + if (this.server!=null) try { this.server.close(); } catch (IOException e) { @@ -396,7 +396,7 @@ } catch (IOException e) { this.log(this,"Error creating server socket",e); } - + // Can't get a hold of a server socket if (this.server==null) { this.log(this,"Unable to create server socket"); @@ -427,7 +427,7 @@ /* ==================================================================== */ /* Logging and debugging methods */ /* ==================================================================== */ - + /** Log to the container logger with the specified level or to stderr */ private void log(Object src, String msg, Exception exc, int lev) { Container cont=this.getContainer(); @@ -449,7 +449,7 @@ if (exc==null) logg.log(msg,lev); else logg.log(msg,exc,lev); } - + /** Invoked when we can't get a hold on the logger, dump to stderr */ private void dump(Object src, String message, Exception exception) { String cls="["+src.getClass().getName()+"] "; @@ -462,7 +462,7 @@ System.err.print(cls); exception.printStackTrace(System.err); } - } + } /** * If Constants.DEBUG was set true at compilation time, dump a debug 1.8 +4 -4 jakarta-tomcat-connectors/webapp/java/WarpPacket.java Index: WarpPacket.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/webapp/java/WarpPacket.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- WarpPacket.java 2001/07/13 02:13:15 1.7 +++ WarpPacket.java 2001/07/13 02:51:45 1.8 @@ -42,7 +42,7 @@ public void setType(int type) { this.type=type; } - + /** * Return the type of this packet. * @@ -105,7 +105,7 @@ byte temp[]=string.getBytes("UTF-8"); if ((this.size+temp.length+2)>MAX_LENGTH) throw new ArrayIndexOutOfBoundsException("Too much data"); - + this.writeUnsignedShort(temp.length); System.arraycopy(temp,0,this.buffer,this.size,temp.length); this.size+=temp.length; @@ -124,7 +124,7 @@ public int readUnsignedShort() { if ((this.pointer+2)>this.size) throw new ArrayIndexOutOfBoundsException("No data available"); - + int k=0; k=(k<<8)|(this.buffer[this.pointer++]); k=(k<<8)|(this.buffer[this.pointer++]); @@ -142,7 +142,7 @@ public int readInteger() { if ((this.pointer+4)>this.size) throw new ArrayIndexOutOfBoundsException("No data available"); - + int k=0; k=(k<<8)|(this.buffer[this.pointer++]); k=(k<<8)|(this.buffer[this.pointer++]);