hgomez 02/02/21 03:13:23 Modified: jk/native2/common jk_requtil.c jk_serialize_ajp.c jk_uriMap.c jk_vm_default.c Log: Fifth batch of jk2 renaming task Revision Changes Path 1.7 +13 -13 jakarta-tomcat-connectors/jk/native2/common/jk_requtil.c Index: jk_requtil.c =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_requtil.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- jk_requtil.c 26 Jan 2002 07:07:41 -0000 1.6 +++ jk_requtil.c 21 Feb 2002 11:13:23 -0000 1.7 @@ -70,7 +70,7 @@ #define CHUNK_BUFFER_PAD (12) -const char *response_trans_headers[] = { +static const char *response_trans_headers[] = { "Content-Type", "Content-Language", "Content-Length", @@ -89,7 +89,7 @@ * * long_res_header_for_sc */ -const char *jk_requtil_getHeaderById(jk_env_t *env, int sc) +const char *jk2_requtil_getHeaderById(jk_env_t *env, int sc) { const char *rc = NULL; if(sc <= SC_RES_HEADERS_NUM && sc > 0) { @@ -104,7 +104,7 @@ * * sc_for_req_method */ -int jk_requtil_getMethodId(jk_env_t *env, const char *method, +int jk2_requtil_getMethodId(jk_env_t *env, const char *method, unsigned char *sc) { int rc = JK_TRUE; @@ -162,7 +162,7 @@ * * sc_for_req_header */ -int jk_requtil_getHeaderId(jk_env_t *env, const char *header_name, +int jk2_requtil_getHeaderId(jk_env_t *env, const char *header_name, unsigned short *sc) { switch(header_name[0]) { @@ -251,7 +251,7 @@ /** Retrieve the cookie with the given name */ -char *jk_requtil_getCookieByName(jk_env_t *env, jk_ws_service_t *s, +char *jk2_requtil_getCookieByName(jk_env_t *env, jk_ws_service_t *s, const char *name) { int i; @@ -289,7 +289,7 @@ /* Retrieve the parameter with the given name */ -char *jk_requtil_getPathParam(jk_env_t *env, jk_ws_service_t *s, +char *jk2_requtil_getPathParam(jk_env_t *env, jk_ws_service_t *s, const char *name) { char *id_start = NULL; @@ -323,12 +323,12 @@ /** Retrieve session id from the cookie or the parameter * (parameter first) */ -char *jk_requtil_getSessionId(jk_env_t *env, jk_ws_service_t *s) +char *jk2_requtil_getSessionId(jk_env_t *env, jk_ws_service_t *s) { char *val; - val = jk_requtil_getPathParam(env, s, JK_PATH_SESSION_IDENTIFIER); + val = jk2_requtil_getPathParam(env, s, JK_PATH_SESSION_IDENTIFIER); if(!val) { - val = jk_requtil_getCookieByName(env, s, JK_SESSION_IDENTIFIER); + val = jk2_requtil_getCookieByName(env, s, JK_SESSION_IDENTIFIER); } return val; } @@ -337,9 +337,9 @@ * the id of the worker that generated the session and where all * further requests in that session will be sent. */ -char *jk_requtil_getSessionRoute(jk_env_t *env, jk_ws_service_t *s) +char *jk2_requtil_getSessionRoute(jk_env_t *env, jk_ws_service_t *s) { - char *sessionid = jk_requtil_getSessionId(env, s); + char *sessionid = jk2_requtil_getSessionId(env, s); char *ch; if(!sessionid) { @@ -367,7 +367,7 @@ * Socket API didn't garanty all the data will be kept in a single * read, so we must loop up to all awaited data are received */ -int jk_requtil_readFully(jk_env_t *env, jk_ws_service_t *s, +int jk2_requtil_readFully(jk_env_t *env, jk_ws_service_t *s, unsigned char *buf, unsigned len) { @@ -409,7 +409,7 @@ * * jk_init_ws_service */ -void jk_requtil_initRequest(jk_env_t *env, jk_ws_service_t *s) +void jk2_requtil_initRequest(jk_env_t *env, jk_ws_service_t *s) { s->ws_private = NULL; s->method = NULL; 1.6 +13 -13 jakarta-tomcat-connectors/jk/native2/common/jk_serialize_ajp.c Index: jk_serialize_ajp.c =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_serialize_ajp.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- jk_serialize_ajp.c 26 Jan 2002 07:10:05 -0000 1.5 +++ jk_serialize_ajp.c 21 Feb 2002 11:13:23 -0000 1.6 @@ -86,7 +86,7 @@ #define JK_AJP13_SHUTDOWN (unsigned char)7 -#define JK_AJP13_PING (unsigned char)8 +#define JK_AJP13_PING (unsigned char)8 /* * Build the ping cmd. Tomcat will get control and will be able @@ -99,8 +99,8 @@ * XXX Add optional Key/Value set . * */ -int jk_serialize_ping(jk_env_t *env, jk_msg_t *msg, - jk_endpoint_t *ae) +int jk2_serialize_ping(jk_env_t *env, jk_msg_t *msg, + jk_endpoint_t *ae) { int rc; @@ -169,15 +169,15 @@ Was: ajp_marshal_into_msgb */ -int jk_serialize_request13(jk_env_t *env, jk_msg_t *msg, - jk_ws_service_t *s, - jk_endpoint_t *ae) +int jk2_serialize_request13(jk_env_t *env, jk_msg_t *msg, + jk_ws_service_t *s, + jk_endpoint_t *ae) { unsigned char method; int i; int headerCount; - if (!jk_requtil_getMethodId(env, s->method, &method)) { + if (!jk2_requtil_getMethodId(env, s->method, &method)) { env->l->jkLog(env, env->l, JK_LOG_ERROR, "Error ajp_marshal_into_msgb - No such method %s\n", s->method); @@ -207,7 +207,7 @@ char *name=s->headers_in->nameAt(env, s->headers_in, i); - if (jk_requtil_getHeaderId(env, name, &sc)) { + if (jk2_requtil_getHeaderId(env, name, &sc)) { if (msg->appendInt(env, msg, sc)) { env->l->jkLog(env, env->l, JK_LOG_ERROR, "handle.request() Error serializing header id\n"); @@ -345,9 +345,9 @@ /** The inital BODY chunk */ -int jk_serialize_postHead(jk_env_t *env, jk_msg_t *msg, - jk_ws_service_t *r, - jk_endpoint_t *e) +int jk2_serialize_postHead(jk_env_t *env, jk_msg_t *msg, + jk_ws_service_t *r, + jk_endpoint_t *e) { int len = r->left_bytes_to_send; @@ -380,8 +380,8 @@ * +-----------------------+ * */ -int jk_serialize_shutdown(jk_env_t *env, jk_msg_t *msg, - jk_ws_service_t *r) +int jk2_serialize_shutdown(jk_env_t *env, jk_msg_t *msg, + jk_ws_service_t *r) { int rc; 1.13 +47 -47 jakarta-tomcat-connectors/jk/native2/common/jk_uriMap.c Index: jk_uriMap.c =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_uriMap.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- jk_uriMap.c 16 Dec 2001 23:29:55 -0000 1.12 +++ jk_uriMap.c 21 Feb 2002 11:13:23 -0000 1.13 @@ -67,33 +67,33 @@ * servlet container. * * Author: Gal Shachor <[EMAIL PROTECTED]> - * Version: $Revision: 1.12 $ + * Version: $Revision: 1.13 $ */ #include "jk_pool.h" #include "jk_env.h" #include "jk_uriMap.h" -int JK_METHOD jk_uriMap_factory( jk_env_t *env, jk_pool_t *pool, void **result, +int JK_METHOD jk2_uriMap_factory(jk_env_t *env, jk_pool_t *pool, void **result, const char *type, const char *name); -static int jk_uriMap_init( jk_env_t *env, jk_uriMap_t *_this, - jk_workerEnv_t *workerEnv, - jk_map_t *init_data ); - -static jk_uriEnv_t *jk_uriMap_addMapping(jk_env_t *env, jk_uriMap_t *_this, - const char *vhost, - const char *puri, - const char *pworker ); - -static INLINE const char *findExtension( jk_env_t *env, const char *uri ); - -static jk_uriEnv_t *jk_uriMap_mapUri( jk_env_t *env, jk_uriMap_t *_this, - const char *vhost, - const char *uri ); +static int jk2_uriMap_init(jk_env_t *env, jk_uriMap_t *_this, + jk_workerEnv_t *workerEnv, + jk_map_t *init_data); + +static jk_uriEnv_t *jk2_uriMap_addMapping(jk_env_t *env, jk_uriMap_t *_this, + const char *vhost, + const char *puri, + const char *pworker); + +static INLINE const char *jk2_findExtension(jk_env_t *env, const char *uri); + +static jk_uriEnv_t *jk2_uriMap_mapUri(jk_env_t *env, jk_uriMap_t *_this, + const char *vhost, + const char *uri); -static int jk_uriMap_checkUri( jk_env_t *env, jk_uriMap_t *_this, - const char *uri ); +static int jk2_uriMap_checkUri(jk_env_t *env, jk_uriMap_t *_this, + const char *uri); /* * We are now in a security nightmare, it maybe that somebody sent @@ -106,8 +106,8 @@ * * Was: check_security_fraud */ -static int jk_uriMap_checkUri( jk_env_t *env, jk_uriMap_t *_this, - const char *uri ) +static int jk2_uriMap_checkUri(jk_env_t *env, jk_uriMap_t *_this, + const char *uri) { int i; @@ -150,7 +150,7 @@ /* * Ensure there will be memory in context info to store Context Bases */ -static int uriMap_realloc( jk_env_t *env,jk_uriMap_t *_this) +static int jk2_uriMap_realloc(jk_env_t *env,jk_uriMap_t *_this) { if (_this->size == _this->capacity) { jk_uriEnv_t **uwr=NULL; @@ -174,8 +174,8 @@ return JK_TRUE; } -static jk_uriEnv_t *jk_uriMap_createUriEnv( jk_env_t *env, jk_uriMap_t *_this, - const char *vhost, const char *uri ) +static jk_uriEnv_t *jk2_uriMap_createUriEnv(jk_env_t *env, jk_uriMap_t *_this, + const char *vhost, const char *uri) { jk_uriEnv_t *uriEnv=(jk_uriEnv_t *)_this->pool->calloc(env, _this->pool, sizeof(jk_uriEnv_t)); @@ -187,10 +187,10 @@ return uriEnv; } -static jk_uriEnv_t *jk_uriMap_addMapping( jk_env_t *env, jk_uriMap_t *_this, - const char *vhost, - const char *puri, - const char *pworker ) +static jk_uriEnv_t *jk2_uriMap_addMapping(jk_env_t *env, jk_uriMap_t *_this, + const char *vhost, + const char *puri, + const char *pworker) { jk_uriEnv_t *uwr; char *uri; @@ -199,14 +199,14 @@ char *asterisk; /* make sure we have space */ - err=uriMap_realloc(env, _this); + err=jk2_uriMap_realloc(env, _this); if (err != JK_TRUE ) { env->l->jkLog(env, env->l, JK_LOG_ERROR, "uriMap.addMappint() OutOfMemoryException\n"); return NULL; } - uwr = jk_uriMap_createUriEnv(env, _this,vhost,puri); + uwr = jk2_uriMap_createUriEnv(env, _this,vhost,puri); uri = _this->pool->pstrdup(env, _this->pool, puri); uwr->uri = _this->pool->pstrdup(env, _this->pool, uri); @@ -316,9 +316,9 @@ return uwr; } -static int jk_uriMap_init( jk_env_t *env, jk_uriMap_t *_this, - jk_workerEnv_t *workerEnv, - jk_map_t *init_data ) +static int jk2_uriMap_init(jk_env_t *env, jk_uriMap_t *_this, + jk_workerEnv_t *workerEnv, + jk_map_t *init_data) { int rc=JK_TRUE; int sz; @@ -329,7 +329,7 @@ sz = init_data->size(env, init_data); - _this->debug=jk_map_getIntProp(env, + _this->debug=jk2_map_getIntProp(env, init_data,"urimap", "default", "debug", 0 ); for(i = 0; i < sz ; i++) { @@ -369,7 +369,7 @@ return rc; } -static void jk_uriMap_destroy( jk_env_t *env, jk_uriMap_t *_this) +static void jk2_uriMap_destroy(jk_env_t *env, jk_uriMap_t *_this) { if( _this->debug > 0 ) @@ -383,7 +383,7 @@ /* returns the index of the last occurrence of the 'ch' character if ch=='\0' returns the length of the string str */ -static INLINE int last_index_of(const char *str,char ch) +static INLINE int jk2_last_index_of(const char *str,char ch) { const char *str_minus_one=str-1; const char *s=str+strlen(str); @@ -397,7 +397,7 @@ we check only the last component, as required by servlet spec */ -static INLINE const char *findExtension( jk_env_t *env, const char *uri ) { +static INLINE const char *jk2_findExtension(jk_env_t *env, const char *uri) { int suffix_start; const char *suffix; @@ -420,9 +420,9 @@ #define SAFE_URI_SIZE 8192 -static jk_uriEnv_t *jk_uriMap_mapUri( jk_env_t *env, jk_uriMap_t *_this, - const char *vhost, - const char *uri ) +static jk_uriEnv_t *jk2_uriMap_mapUri(jk_env_t *env, jk_uriMap_t *_this, + const char *vhost, + const char *uri) { int i; int best_match = -1; @@ -472,7 +472,7 @@ uriLen=strlen( uri ); /* Only once, no need to compute it for each extension match */ - suffix=findExtension( env, uri ); + suffix=jk2_findExtension( env, uri ); for(i = 0 ; i < _this->size ; i++) { jk_uriEnv_t *uwr = _this->maps[i]; @@ -509,7 +509,7 @@ } } else if(MATCH_TYPE_GENERAL_SUFFIX == uwr->match_type) { if(uwr->prefix_len >= longest_match) { - int suffix_start=last_index_of(uri,uwr->suffix[0]); + int suffix_start=jk2_last_index_of(uri,uwr->suffix[0]); if (suffix_start>=0 && 0==strcmp(uri+suffix_start,uwr->suffix)) { if( _this->debug > 0 ) env->l->jkLog(env, env->l, JK_LOG_INFO, @@ -564,7 +564,7 @@ return NULL; } -int JK_METHOD jk_uriMap_factory( jk_env_t *env, jk_pool_t *pool, void **result, +int JK_METHOD jk2_uriMap_factory(jk_env_t *env, jk_pool_t *pool, void **result, const char *type, const char *name) { jk_uriMap_t *_this; @@ -584,11 +584,11 @@ *result=_this; - _this->init=jk_uriMap_init; - _this->destroy=jk_uriMap_destroy; - _this->addMapping=jk_uriMap_addMapping; - _this->checkUri=jk_uriMap_checkUri; - _this->mapUri=jk_uriMap_mapUri; + _this->init=jk2_uriMap_init; + _this->destroy=jk2_uriMap_destroy; + _this->addMapping=jk2_uriMap_addMapping; + _this->checkUri=jk2_uriMap_checkUri; + _this->mapUri=jk2_uriMap_mapUri; _this->maps = NULL; _this->debug= 1; 1.4 +73 -73 jakarta-tomcat-connectors/jk/native2/common/jk_vm_default.c Index: jk_vm_default.c =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_vm_default.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- jk_vm_default.c 6 Feb 2002 19:15:25 -0000 1.3 +++ jk_vm_default.c 21 Feb 2002 11:13:23 -0000 1.4 @@ -99,11 +99,11 @@ #define null_check(e) if ((e) == 0) return JK_FALSE -static int open_jvm1(jk_env_t *env, jk_vm_t *p); +static int jk2_open_jvm1(jk_env_t *env, jk_vm_t *p); #ifdef JNI_VERSION_1_2 -static int detect_jvm_version(jk_env_t *env); -static int open_jvm2(jk_env_t *env, jk_vm_t *p); +static int jk2_detect_jvm_version(jk_env_t *env); +static int jk2_open_jvm2(jk_env_t *env, jk_vm_t *p); #endif jint (JNICALL *jni_get_default_java_vm_init_args)(void *) = NULL; @@ -129,7 +129,7 @@ }; #if defined LINUX && defined APACHE2_SIGHACK -static void linux_signal_hack() +static void jk2_linux_signal_hack() { sigset_t newM; sigset_t old; @@ -146,7 +146,7 @@ pthread_sigmask( SIG_SETMASK, &old, NULL ); } -static void print_signals( sigset_t *sset) { +static void jk2_print_signals( sigset_t *sset) { int sig; for (sig = 1; sig < 20; sig++) { if (sigismember(sset, sig)) {printf( " %d", sig);} } @@ -156,7 +156,7 @@ -int jk_vm_loadJvm(jk_env_t *env, jk_vm_t *p) +int jk2_vm_loadJvm(jk_env_t *env, jk_vm_t *p) { #ifdef WIN32 HINSTANCE hInst = LoadLibrary(p->jvm_dll_path); @@ -241,7 +241,7 @@ } -void *jk_vm_attach(jk_env_t *env, jk_vm_t *p) +void *jk2_vm_attach(jk_env_t *env, jk_vm_t *p) { JNIEnv *rc = NULL; int err; @@ -253,7 +253,7 @@ * the JVM usually hangs when a new thread tries to attach to it */ /* XXX do we need to do that on _each_ attach or only when we create the vm ??? */ - /* linux_signal_hack(); */ + /* jk2_linux_signal_hack(); */ #endif err= (*jvm)->GetEnv( jvm, (void **)&rc, JNI_VERSION_1_2 ); @@ -277,7 +277,7 @@ } -void jk_vm_detach(jk_env_t *env, jk_vm_t *p) +void jk2_vm_detach(jk_env_t *env, jk_vm_t *p) { int err; JavaVM *jvm = (JavaVM *)p->jvm; @@ -296,7 +296,7 @@ } } -static int jk_file_exists(jk_env_t *env, const char *f) +static int jk2_file_exists(jk_env_t *env, const char *f) { if(f) { struct stat st; @@ -312,8 +312,8 @@ /* Some guessing - to spare the user ( who might know less than we do ). */ -char* jk_vm_guessJvmDll( jk_env_t *env, jk_map_t *props, - jk_vm_t *jniw, char *prefix ) +char* jk2_vm_guessJvmDll(jk_env_t *env, jk_map_t *props, + jk_vm_t *jniw, char *prefix) { char *jvm; jk_pool_t *p=props->pool; @@ -321,9 +321,9 @@ char *libp; /* Maybe he knows more */ - jvm =jk_map_getStrProp( env, props, NULL, prefix, + jvm =jk2_map_getStrProp( env, props, NULL, prefix, "jvm_lib", NULL ); - if( jvm!=NULL && jk_file_exists(env, jvm)) { + if( jvm!=NULL && jk2_file_exists(env, jvm)) { env->l->jkLog(env, env->l, JK_LOG_INFO, "jni.guessJvmDll() - user specified %s\n", jvm); return jvm; @@ -332,10 +332,10 @@ /* We need at least JAVA_HOME ( either env or in settings ) */ while( *current != NULL ) { - jvm = jk_map_replaceProperties(env, props, p, + jvm = jk2_map_replaceProperties(env, props, p, (char *)p->pstrdup( env, p, *current ) ); - if( jvm!=NULL && jk_file_exists(env, jvm)) { + if( jvm!=NULL && jk2_file_exists(env, jvm)) { env->l->jkLog(env, env->l, JK_LOG_INFO, "jni.guessJvmDll() %s\n", jvm); return jvm; @@ -353,7 +353,7 @@ } -int jk_vm_openVM(jk_env_t *env, jk_vm_t *p) +int jk2_vm_openVM(jk_env_t *env, jk_vm_t *p) { int jvm_version; @@ -362,19 +362,19 @@ * the JVM usually hangs when a new thread tries to attach to it */ /* XXX do we need to do that on _each_ attach or only when we create the vm ??? */ - linux_signal_hack(); + jk2_linux_signal_hack(); #endif /* That's kind of strange - if we have JNI_VERSION_1_2 I assume we also have 1.2, what do we detect ???? */ #ifdef JNI_VERSION_1_2 - jvm_version= detect_jvm_version(env); + jvm_version= jk2_detect_jvm_version(env); switch(jvm_version) { case JNI_VERSION_1_1: - return open_jvm1(env, p); + return jk2_open_jvm1(env, p); case JNI_VERSION_1_2: - return open_jvm2(env, p); + return jk2_open_jvm2(env, p); default: return JK_FALSE; } @@ -383,11 +383,11 @@ #warning ------------------------------------------------------- #warning NO JAVA 2 HEADERS! SUPPORT FOR JAVA 2 FEATURES DISABLED #warning ------------------------------------------------------- - return open_jvm1(env, p, jniEnv); + return jk2_open_jvm1(env, p, jniEnv); #endif } -static int open_jvm1(jk_env_t *env, jk_vm_t *p) +static int jk2_open_jvm1(jk_env_t *env, jk_vm_t *p) { JDK1_1InitArgs vm_args; int err; @@ -466,7 +466,7 @@ } #ifdef JNI_VERSION_1_2 -static int detect_jvm_version(jk_env_t *env) +static int jk2_detect_jvm_version(jk_env_t *env) { JDK1_1InitArgs vm_args; @@ -486,8 +486,8 @@ return vm_args.version; } -static char* build_opt_str(jk_env_t *env, jk_pool_t *pool, - char* opt_name, char* opt_value ) +static char* jk2_build_opt_str(jk_env_t *env, jk_pool_t *pool, + char* opt_name, char* opt_value) { unsigned len = strlen(opt_name) + strlen(opt_value) + 2; @@ -499,14 +499,14 @@ return tmp; } else { env->l->jkLog(env, env->l, JK_LOG_EMERG, - "Fail-> build_opt_str allocation error for %s\n", + "Fail-> jk2_build_opt_str allocation error for %s\n", opt_name); return NULL; } } -static char* build_opt_int(jk_env_t *env, jk_pool_t *pool, - char* opt_name, int opt_value ) +static char* jk2_build_opt_int(jk_env_t *env, jk_pool_t *pool, + char* opt_name, int opt_value) { /* [V] this should suffice even for 64-bit int */ unsigned len = strlen(opt_name) + 20 + 2; @@ -518,14 +518,14 @@ return tmp; } else { env->l->jkLog(env, env->l, JK_LOG_EMERG, - "Fail-> build_opt_int allocation error for %s\n", + "Fail-> jk2_build_opt_int allocation error for %s\n", opt_name); return NULL; } } -static int open_jvm2(jk_env_t *env, jk_vm_t *p) +static int jk2_open_jvm2(jk_env_t *env, jk_vm_t *p) { JavaVMInitArgs vm_args; JNIEnv *penv; @@ -540,7 +540,7 @@ if(p->tomcat_classpath) { env->l->jkLog(env, env->l, JK_LOG_INFO, "jni.openJvm2() CLASSPATH=%s\n", p->tomcat_classpath); - tmp = build_opt_str(env, p->pool, "-Djava.class.path=", + tmp = jk2_build_opt_str(env, p->pool, "-Djava.class.path=", p->tomcat_classpath); null_check(tmp); options[optn++].optionString = tmp; @@ -549,7 +549,7 @@ if(p->tomcat_mx) { env->l->jkLog(env, env->l, JK_LOG_INFO, "jni.openJvm2() -Xmx %d\n", p->tomcat_mx); - tmp = build_opt_int(env, p->pool, "-Xmx", p->tomcat_mx); + tmp = jk2_build_opt_int(env, p->pool, "-Xmx", p->tomcat_mx); null_check(tmp); options[optn++].optionString = tmp; } @@ -557,7 +557,7 @@ if(p->tomcat_ms) { env->l->jkLog(env, env->l, JK_LOG_INFO, "jni.openJvm2() -Xms %d\n", p->tomcat_ms); - tmp = build_opt_int(env, p->pool, "-Xms", p->tomcat_ms); + tmp = jk2_build_opt_int(env, p->pool, "-Xms", p->tomcat_ms); null_check(tmp); options[optn++].optionString = tmp; } @@ -567,7 +567,7 @@ while(p->sysprops[i]) { env->l->jkLog(env, env->l, JK_LOG_INFO, "jni.openJvm2() -D%s\n", p->sysprops[i]); - tmp = build_opt_str(env, p->pool, "-D", p->sysprops[i]); + tmp = jk2_build_opt_str(env, p->pool, "-D", p->sysprops[i]); null_check(tmp); options[optn++].optionString = tmp; i++; @@ -632,7 +632,7 @@ env. Set it as 'tomcat.home'. ( XXX try 'standard' locations, relative to apache home, etc ) */ -static char *guessTomcatHome(jk_env_t *env, jk_map_t *props ) +static char *jk2_guessTomcatHome(jk_env_t *env, jk_map_t *props ) { /* TOMCAT_HOME or CATALINA_HOME */ char *tomcat_home; @@ -653,7 +653,7 @@ } env->l->jkLog(env, env->l, JK_LOG_INFO, - "jni.guessTomcatHome() %s\n", tomcat_home); + "jni.jk2_guessTomcatHome() %s\n", tomcat_home); props->put(env, props, "tomcat.home", props->pool->pstrdup( env, props->pool, tomcat_home ), NULL); @@ -661,20 +661,20 @@ return tomcat_home; } -static char *guessClassPath(jk_env_t *env, jk_map_t *props ) +static char *jk2_guessClassPath(jk_env_t *env, jk_map_t *props) { /* Guess 3.3, 4.0, 4.1 'standard' locations */ char *jkJar; jk_pool_t *p=props->pool; const char **current=defaultJK_PATH; - guessTomcatHome( env, props ); + jk2_guessTomcatHome( env, props ); while( *current != NULL ) { - jkJar = jk_map_replaceProperties(env, props, p, + jkJar = jk2_map_replaceProperties(env, props, p, (char *)p->pstrdup( env, p, *current )); - if( jkJar!=NULL && jk_file_exists(env, jkJar)) { + if( jkJar!=NULL && jk2_file_exists(env, jkJar)) { env->l->jkLog(env, env->l, JK_LOG_INFO, "jni.guessJkJar() %s\n", jkJar); return jkJar; @@ -694,20 +694,20 @@ /** Initialize the vm properties */ -int jk_vm_init(jk_env_t *env, jk_vm_t *_this, - jk_map_t *props, char *prefix) +int jk2_jk_vm_init(jk_env_t *env, jk_vm_t *_this, + jk_map_t *props, char *prefix) { char *str_config; int int_config; - _this->tomcat_mx= jk_map_getIntProp( env, props, NULL, prefix, "mx", 0 ); - _this->tomcat_ms= jk_map_getIntProp( env, props, NULL, prefix, "ms", 0 ); + _this->tomcat_mx= jk2_map_getIntProp( env, props, NULL, prefix, "mx", 0 ); + _this->tomcat_ms= jk2_map_getIntProp( env, props, NULL, prefix, "ms", 0 ); - _this->tomcat_classpath= jk_map_getStrProp( env, props, NULL, prefix, + _this->tomcat_classpath= jk2_map_getStrProp( env, props, NULL, prefix, "class_path", NULL ); if(_this->tomcat_classpath == NULL ) { - _this->tomcat_classpath = guessClassPath( env, props ); + _this->tomcat_classpath = jk2_guessClassPath( env, props ); } if(_this->tomcat_classpath == NULL ) { @@ -722,7 +722,7 @@ return JK_FALSE; } - _this->jvm_dll_path=jk_vm_guessJvmDll( env, props, _this, prefix ); + _this->jvm_dll_path=jk2_vm_guessJvmDll( env, props, _this, prefix ); if(!_this->jvm_dll_path ) { env->l->jkLog(env, env->l, JK_LOG_EMERG, @@ -732,22 +732,22 @@ env->l->jkLog(env, env->l, JK_LOG_INFO, "Jni lib: %s\n", _this->jvm_dll_path); - str_config= jk_map_getStrProp( env, props, NULL, prefix, + str_config= jk2_map_getStrProp( env, props, NULL, prefix, "sysprops", NULL ); if(str_config!= NULL ) { - _this->sysprops = jk_map_split( env, NULL, _this->pool, + _this->sysprops = jk2_map_split( env, NULL, _this->pool, str_config, "*", NULL); } #ifdef JNI_VERSION_1_2 - str_config= jk_map_getStrProp(env, props, NULL,prefix ,"java2opts",NULL ); + str_config= jk2_map_getStrProp(env, props, NULL,prefix ,"java2opts",NULL ); if( str_config != NULL ) { env->l->jkLog(env, env->l, JK_LOG_INFO, "jni.validate() java2opts %s\n", str_config); - _this->java2opts = jk_map_split( env, NULL, _this->pool, + _this->java2opts = jk2_map_split( env, NULL, _this->pool, str_config, "*", NULL); } - int_config= jk_map_getIntProp( env, props, NULL, prefix, "java2lax", -1 ); + int_config= jk2_map_getIntProp( env, props, NULL, prefix, "java2lax", -1 ); if(int_config != -1 ) { _this->java2lax = int_config ? JK_TRUE : JK_FALSE; } @@ -755,9 +755,9 @@ return JK_TRUE; } -int jk_vm_factory( jk_env_t *env, jk_pool_t *pool, - void **result, - char *type, char *name) +int jk2_jk_vm_factory(jk_env_t *env, jk_pool_t *pool, + void **result, + char *type, char *name) { jk_vm_t *_this; @@ -775,11 +775,11 @@ _this->java2lax = JK_TRUE; #endif - _this->open=jk_vm_openVM; - _this->load=jk_vm_loadJvm; - _this->init=jk_vm_init; - _this->attach=jk_vm_attach; - _this->detach=jk_vm_detach; + _this->open=jk2_vm_openVM; + _this->load=jk2_vm_loadJvm; + _this->init=jk2_jk_vm_init; + _this->attach=jk2_vm_attach; + _this->detach=jk2_vm_detach; *result=_this; return JK_TRUE; @@ -796,7 +796,7 @@ NULL }; -static int jk_dir_exists(jk_env_t *env, const char *f) +static int jk2_jk_dir_exists(jk_env_t *env, const char *f) { if(f) { struct stat st; @@ -807,8 +807,8 @@ return JK_FALSE; } -static void jk_vm_appendLibpath(jk_env_t *env, jk_pool_t *pool, - const char *libpath) +static void jk2_vm_appendLibpath(jk_env_t *env, jk_pool_t *pool, + const char *libpath) { char *envVar = NULL; char *current = getenv(PATH_ENV_VARIABLE); @@ -844,30 +844,30 @@ } -static void addDefaultLibPaths(jk_env_t *env, jk_map_t *props, - jk_vm_t *jniw, char *prefix ) +static void jk2_addDefaultLibPaths(jk_env_t *env, jk_map_t *props, + jk_vm_t *jniw, char *prefix) { jk_pool_t *p=props->pool; const char **current=defaultLIB_PATH; char *libp; while( *current != NULL ) { - libp = jk_map_replaceProperties(env, props, p, + libp = jk2_map_replaceProperties(env, props, p, p->pstrdup( env, p, *current )); - if( libp!=NULL && jk_dir_exists(env, libp)) { + if( libp!=NULL && jk2_jk_dir_exists(env, libp)) { env->l->jkLog(env, env->l, JK_LOG_INFO, - "jni.addDefaultLibPaths() %s\n", libp); - jk_vm_appendLibpath(env, p, libp); + "jni.jk2_addDefaultLibPaths() %s\n", libp); + jk2_vm_appendLibpath(env, p, libp); } else { env->l->jkLog(env, env->l, JK_LOG_INFO, - "jni.addDefaultLibPaths() failed %s\n", libp); + "jni.jk2_addDefaultLibPaths() failed %s\n", libp); } current++; } } -jobject jk_vm_newObject(jk_env_t *env, jk_vm_t *p, - JNIEnv *jniEnv, char *className, jclass objClass) +jobject jk2_vm_newObject(jk_env_t *env, jk_vm_t *p, + JNIEnv *jniEnv, char *className, jclass objClass) { jmethodID constructor_method_id; jobject objInst;
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>