remm        01/07/10 00:36:44

  Modified:    catalina/src/share/org/apache/catalina/connector/http
                        HttpConnector.java
  Log:
  - Negative value for maxProcessors means unlimited number of processors.
    Bug reported by Kumar Mettu <mettu.kumar at redspark.com>
  
  Revision  Changes    Path
  1.18      +17 -11    
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpConnector.java
  
  Index: HttpConnector.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpConnector.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- HttpConnector.java        2001/06/18 21:35:54     1.17
  +++ HttpConnector.java        2001/07/10 07:36:42     1.18
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpConnector.java,v
 1.17 2001/06/18 21:35:54 remm Exp $
  - * $Revision: 1.17 $
  - * $Date: 2001/06/18 21:35:54 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpConnector.java,v
 1.18 2001/07/10 07:36:42 remm Exp $
  + * $Revision: 1.18 $
  + * $Date: 2001/07/10 07:36:42 $
    *
    * ====================================================================
    *
  @@ -95,7 +95,7 @@
    *
    * @author Craig R. McClanahan
    * @author Remy Maucherat
  - * @version $Revision: 1.17 $ $Date: 2001/06/18 21:35:54 $
  + * @version $Revision: 1.18 $ $Date: 2001/07/10 07:36:42 $
    */
   
   
  @@ -805,18 +805,24 @@
   
        synchronized (processors) {
            if (processors.size() > 0) {
  -                //                if (debug >= 2)
  -                //                    log("createProcessor: Reusing existing 
processor");
  +                // if (debug >= 2)
  +                // log("createProcessor: Reusing existing processor");
                return ((HttpProcessor) processors.pop());
               }
            if ((maxProcessors > 0) && (curProcessors < maxProcessors)) {
  -                //                if (debug >= 2)
  -                //                    log("createProcessor: Creating new 
processor");
  +                // if (debug >= 2)
  +                // log("createProcessor: Creating new processor");
                return (newProcessor());
               } else {
  -                //                if (debug >= 2)
  -                //                    log("createProcessor: Cannot create new 
processor");
  -             return (null);
  +                if (maxProcessors < 0) {
  +                    // if (debug >= 2)
  +                    // log("createProcessor: Creating new processor");
  +                    return (newProcessor());
  +             } else {
  +                    // if (debug >= 2)
  +                    // log("createProcessor: Cannot create new processor");
  +                    return (null);
  +                }
               }
        }
   
  
  
  

Reply via email to