Could some one please remove me from this Forum, I did not subcribe to this. Thanks, Van http://www.pazap.com t : +44 (0) 1256 869 200 f : +44 (0) 1256 329 119 m : +44 (0) 0000 000 000 e : mailto:[EMAIL PROTECTED] -----Original Message----- From: Monique Salter [mailto:[EMAIL PROTECTED]] Sent: 04 July 2001 10:29 To: [EMAIL PROTECTED] Subject: FW: cvs commit: jakarta-tomcat-connectors/jk/native/common jk_ajp14.c jk_service.h jk_worker.c -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 03 July 2001 22:57 To: [EMAIL PROTECTED] Subject: cvs commit: jakarta-tomcat-connectors/jk/native/common jk_ajp14.c jk_service.h jk_worker.c costin 01/07/03 14:56:50 Modified: jk/native/common jk_ajp14.c jk_service.h jk_worker.c Log: - in jk_ajp14, avoid a NPE - in jk_service, add a num_of_workers field to workers_env_t, and a first_worker. Both will be used to detect if we have a single worker ( or default worker ? ). I still need to deal with "lb" configurations, where in most cases "lb" is the default worker. The idea is that we'll not need to map uri->worker in 99% of the cases ( assuming the server is configured to do that ), most people either use a single worker or a lb ( but all tomcat requests go to lb ). Special configurations are still possible ( for example "/foo" context to go to JNI worker, "/bar" to a certain tomcat instance ). This is more related with simplifying the manual configuration, using SetHandler - if the special JkMount directive is used we can of course specify a particular worker. Revision Changes Path 1.13 +5 -2 jakarta-tomcat-connectors/jk/native/common/jk_ajp14.c Index: jk_ajp14.c =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_ajp14.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- jk_ajp14.c 2001/07/02 21:14:22 1.12 +++ jk_ajp14.c 2001/07/03 21:56:47 1.13 @@ -1,3 +1,4 @@ +/* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil-*- */ /* ========================================================================= * * * * The Apache Software License, Version 1.1 * @@ -58,7 +59,7 @@ /*************************************************************************** * Description: Next generation bi-directional protocol handler. * * Author: Henri Gomez <[EMAIL PROTECTED]> * - * Version: $Revision: 1.12 $ * + * Version: $Revision: 1.13 $ * ***************************************************************************/ @@ -423,7 +424,9 @@ } /* Check if we get the correct virtual host */ - if (strcmp(c->virtual, vname)) { + if (c->virtual != NULL && + vname != NULL && + strcmp(c->virtual, vname)) { /* set the virtual name, better to add to a virtual list ? */ if (context_set_virtual(c, vname) == JK_FALSE) { 1.7 +5 -1 jakarta-tomcat-connectors/jk/native/common/jk_service.h Index: jk_service.h =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_service.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- jk_service.h 2001/07/02 21:11:47 1.6 +++ jk_service.h 2001/07/03 21:56:48 1.7 @@ -1,3 +1,4 @@ +/* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil-*- */ /* ========================================================================= * * * * The Apache Software License, Version 1.1 * @@ -62,7 +63,7 @@ * Author: Gal Shachor <[EMAIL PROTECTED]> * * Author: Dan Milstein <[EMAIL PROTECTED]> * * Author: Henri Gomez <[EMAIL PROTECTED]> * - * Version: $Revision: 1.6 $ * + * Version: $Revision: 1.7 $ * ***************************************************************************/ #ifndef JK_SERVICE_H @@ -88,6 +89,9 @@ /* The URI to WORKER map, will be feeded by AJP14 autoconf feature */ jk_uri_worker_map_t *uri_to_worker; + + int num_of_workers; + char *first_worker; /* Web-Server we're running on (Apache/IIS/NES) */ char *server_name; 1.7 +5 -2 jakarta-tomcat-connectors/jk/native/common/jk_worker.c Index: jk_worker.c =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_worker.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- jk_worker.c 2001/06/22 08:33:56 1.6 +++ jk_worker.c 2001/07/03 21:56:48 1.7 @@ -1,3 +1,4 @@ +/* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil-*- */ /* ========================================================================= * * * * The Apache Software License, Version 1.1 * @@ -59,7 +60,7 @@ * Description: Workers controller * * Author: Gal Shachor <[EMAIL PROTECTED]> * * Author: Henri Gomez <[EMAIL PROTECTED]> * - * Version: $Revision: 1.6 $ * + * Version: $Revision: 1.7 $ * ***************************************************************************/ #define _PLACE_WORKER_LIST_HERE @@ -105,7 +106,9 @@ return JK_FALSE; } - jk_log(l, JK_LOG_DEBUG, "wc_open, done\n"); + we->num_of_workers=num_of_workers; + we->first_worker=worker_list[0]; + jk_log(l, JK_LOG_DEBUG, "wc_open, done %d\n", num_of_workers); return JK_TRUE; } ============================================================================ p a z a p n e t l t d NETWORK HOUSE BASING VIEW BASINGSTOKE HAMPSHIRE RG21 4HG http://www.pazap.com Tel : +44 (0)1256 869 200 Fax : +44 (0)1256 329 119 ============================================================================ The information in this e-mail and in any attachments is confidential and is intended solely for the attention and use of the named addressee(s). If you are not the intended recipient, or a person responsible for passing it on to the intended recipient, you are not authorised to hold a copy of this information and you must therefore not disclose, copy, distribute, or retain this message or any part of it. mailto:[EMAIL PROTECTED] ============================================================================