hgomez 02/02/21 03:09:31 Modified: jk/native2/common jk_ajp14_worker.c jk_channel_apr_socket.c jk_channel_jni.c jk_channel_socket.c Log: First batch of jk2 renaming commit Revision Changes Path 1.16 +39 -39 jakarta-tomcat-connectors/jk/native2/common/jk_ajp14_worker.c Index: jk_ajp14_worker.c =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_ajp14_worker.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- jk_ajp14_worker.c 6 Feb 2002 19:13:10 -0000 1.15 +++ jk_ajp14_worker.c 21 Feb 2002 11:09:31 -0000 1.16 @@ -91,7 +91,7 @@ * Initialize the worker. */ static int JK_METHOD -jk_worker_ajp14_validate(jk_env_t *env, jk_worker_t *_this, +jk2_worker_ajp14_validate(jk_env_t *env, jk_worker_t *_this, jk_map_t *props, jk_workerEnv_t *we) { @@ -104,11 +104,11 @@ char *channelType; aw = _this; - _this->secret = jk_map_getStrProp( env, props, + _this->secret = jk2_map_getStrProp( env, props, "worker", aw->name, "secretkey", NULL ); _this->secret= _this->pool->pstrdup(env, _this->pool, _this->secret); - channelType = jk_map_getStrProp( env, props, + channelType = jk2_map_getStrProp( env, props, "worker", aw->name, "channel", "socket" ); if( _this->channel == NULL ) { @@ -140,7 +140,7 @@ /* * Close the endpoint (clean buf and close socket) */ -static void jk_close_endpoint(jk_env_t *env, jk_endpoint_t *ae) +static void jk2_close_endpoint(jk_env_t *env, jk_endpoint_t *ae) { env->l->jkLog(env, env->l, JK_LOG_INFO, "endpoint.close() %s\n", ae->worker->name); @@ -155,7 +155,7 @@ /** Connect a channel, implementing the logging protocol if ajp14 */ -static int jk_worker_ajp14_connect(jk_env_t *env, jk_endpoint_t *ae) { +static int jk2_worker_ajp14_connect(jk_env_t *env, jk_endpoint_t *ae) { jk_channel_t *channel=ae->worker->channel; jk_msg_t *msg; @@ -179,7 +179,7 @@ is a reconnect */ msg=ae->reply; - jk_serialize_ping( env, msg, ae ); + jk2_serialize_ping( env, msg, ae ); err = ae->worker->channel->send( env, ae->worker->channel, ae, msg ); @@ -190,7 +190,7 @@ /* Anything but OK - the login failed */ if( err != JK_TRUE ) { - jk_close_endpoint( env, ae ); + jk2_close_endpoint( env, ae ); } return err; } @@ -204,7 +204,7 @@ fails, try to reconnect. */ static int JK_METHOD -jk_worker_ajp14_sendAndReconnect(jk_env_t *env, jk_worker_t *worker, +jk2_worker_ajp14_sendAndReconnect(jk_env_t *env, jk_worker_t *worker, jk_ws_service_t *s, jk_endpoint_t *e ) { @@ -243,7 +243,7 @@ channel->close( env, channel, e ); - err=jk_worker_ajp14_connect(env, e); + err=jk2_worker_ajp14_connect(env, e); if( err != JK_TRUE ) { env->l->jkLog(env, env->l, JK_LOG_ERROR, @@ -263,13 +263,13 @@ static int JK_METHOD -jk_worker_ajp14_forwardStream(jk_env_t *env, jk_worker_t *worker, +jk2_worker_ajp14_forwardStream(jk_env_t *env, jk_worker_t *worker, jk_ws_service_t *s, jk_endpoint_t *e ) { int err; - err=jk_worker_ajp14_sendAndReconnect( env, worker, s, e ); + err=jk2_worker_ajp14_sendAndReconnect( env, worker, s, e ); if( err!=JK_TRUE ) return err; @@ -287,7 +287,7 @@ * for resend if the remote Tomcat is down, a fact we will learn only * doing a read (not yet) */ - err=jk_serialize_postHead( env, e->post, s, e ); + err=jk2_serialize_postHead( env, e->post, s, e ); if (err != JK_TRUE ) { /* the browser stop sending data, no need to recover */ @@ -325,7 +325,7 @@ } static int JK_METHOD -jk_worker_ajp14_forwardSingleThread(jk_env_t *env, jk_worker_t *worker, +jk2_worker_ajp14_forwardSingleThread(jk_env_t *env, jk_worker_t *worker, jk_ws_service_t *s, jk_endpoint_t *e ) { @@ -343,7 +343,7 @@ } static int JK_METHOD -jk_worker_ajp14_service1(jk_env_t *env, jk_worker_t *w, +jk2_worker_ajp14_service1(jk_env_t *env, jk_worker_t *w, jk_ws_service_t *s, jk_endpoint_t *e ) { @@ -374,7 +374,7 @@ /* * We get here initial request (in reqmsg) */ - err=jk_serialize_request13(env, e->request, s, e); + err=jk2_serialize_request13(env, e->request, s, e); if (err!=JK_TRUE) { s->is_recoverable_error = JK_FALSE; env->l->jkLog(env, env->l, JK_LOG_ERROR, @@ -391,9 +391,9 @@ /* First message for this request */ if( w->channel->is_stream == JK_TRUE ) { - err=jk_worker_ajp14_forwardStream( env, w, s, e ); + err=jk2_worker_ajp14_forwardStream( env, w, s, e ); } else { - err=jk_worker_ajp14_forwardSingleThread( env, w, s, e ); + err=jk2_worker_ajp14_forwardSingleThread( env, w, s, e ); } if( w->channel->afterRequest != NULL ) { @@ -409,7 +409,7 @@ static int JK_METHOD -jk_worker_ajp14_done(jk_env_t *env, jk_worker_t *we, jk_endpoint_t *e) +jk2_worker_ajp14_done(jk_env_t *env, jk_worker_t *we, jk_endpoint_t *e) { jk_worker_t *w; @@ -430,7 +430,7 @@ /* No reuse or put() failed */ - jk_close_endpoint(env, e); + jk2_close_endpoint(env, e); env->l->jkLog(env, env->l, JK_LOG_INFO, "ajp14.done() close endpoint %s\n", w->name ); @@ -439,7 +439,7 @@ } static int JK_METHOD -jk_worker_ajp14_getEndpoint(jk_env_t *env, +jk2_worker_ajp14_getEndpoint(jk_env_t *env, jk_worker_t *_this, jk_endpoint_t **eP) { @@ -475,9 +475,9 @@ /* Init message storage areas. */ - e->request = jk_msg_ajp_create( env, e->pool, 0); - e->reply = jk_msg_ajp_create( env, e->pool, 0); - e->post = jk_msg_ajp_create( env, e->pool, 0); + e->request = jk2_msg_ajp_create( env, e->pool, 0); + e->reply = jk2_msg_ajp_create( env, e->pool, 0); + e->post = jk2_msg_ajp_create( env, e->pool, 0); e->reuse = JK_FALSE; @@ -494,24 +494,24 @@ * Serve the request, using AJP13/AJP14 */ static int JK_METHOD -jk_worker_ajp14_service(jk_env_t *env, jk_worker_t *w, +jk2_worker_ajp14_service(jk_env_t *env, jk_worker_t *w, jk_ws_service_t *s) { int err; jk_endpoint_t *e; /* Get endpoint from the pool */ - jk_worker_ajp14_getEndpoint( env, w, &e ); + jk2_worker_ajp14_getEndpoint( env, w, &e ); - err=jk_worker_ajp14_service1( env, w, s, e ); + err=jk2_worker_ajp14_service1( env, w, s, e ); - jk_worker_ajp14_done( env, w, e); + jk2_worker_ajp14_done( env, w, e); return err; } static int JK_METHOD -jk_worker_ajp14_init(jk_env_t *env, jk_worker_t *_this, +jk2_worker_ajp14_init(jk_env_t *env, jk_worker_t *_this, jk_map_t *props, jk_workerEnv_t *we) { @@ -520,12 +520,12 @@ int cache_sz; /* start the connection cache */ - cache_sz=jk_map_getIntProp(env, props, + cache_sz=jk2_map_getIntProp(env, props, "worker", _this->name, "cachesize", JK_OBJCACHE_DEFAULT_SZ ); if (cache_sz > 0) { int err; - _this->endpointCache=jk_objCache_create( env, _this->pool ); + _this->endpointCache=jk2_objCache_create( env, _this->pool ); if( _this->endpointCache != NULL ) { err=_this->endpointCache->init( env, _this->endpointCache, @@ -556,10 +556,10 @@ * update. */ - if (jk_worker_ajp14_getEndpoint(env, _this, &e) == JK_FALSE) + if (jk2_worker_ajp14_getEndpoint(env, _this, &e) == JK_FALSE) return JK_FALSE; - rc=jk_worker_ajp14_connect(env, e); + rc=jk2_worker_ajp14_connect(env, e); if ( rc == JK_TRUE) { @@ -576,7 +576,7 @@ static int JK_METHOD -jk_worker_ajp14_destroy(jk_env_t *env, jk_worker_t *_this) +jk2_worker_ajp14_destroy(jk_env_t *env, jk_worker_t *_this) { int i; @@ -595,7 +595,7 @@ break; } - jk_close_endpoint(env, e); + jk2_close_endpoint(env, e); } _this->endpointCache->destroy( env, _this->endpointCache ); @@ -609,7 +609,7 @@ return JK_TRUE; } -int JK_METHOD jk_worker_ajp14_factory( jk_env_t *env, jk_pool_t *pool, +int JK_METHOD jk2_worker_ajp14_factory( jk_env_t *env, jk_pool_t *pool, void **result, const char *type, const char *name) { @@ -628,10 +628,10 @@ w->channel= NULL; w->secret= NULL; - w->validate= jk_worker_ajp14_validate; - w->init= jk_worker_ajp14_init; - w->destroy=jk_worker_ajp14_destroy; - w->service = jk_worker_ajp14_service; + w->validate= jk2_worker_ajp14_validate; + w->init= jk2_worker_ajp14_init; + w->destroy=jk2_worker_ajp14_destroy; + w->service = jk2_worker_ajp14_service; *result = w; 1.2 +42 -42 jakarta-tomcat-connectors/jk/native2/common/jk_channel_apr_socket.c Index: jk_channel_apr_socket.c =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_channel_apr_socket.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- jk_channel_apr_socket.c 26 Jan 2002 07:05:19 -0000 1.1 +++ jk_channel_apr_socket.c 21 Feb 2002 11:09:31 -0000 1.2 @@ -119,25 +119,25 @@ XXX We could also use properties or 'notes' */ -int JK_METHOD jk_channel_socket_factory(jk_env_t *env, jk_pool_t *pool, - void **result, - const char *type, const char *name); - -static int JK_METHOD jk_channel_socket_resolve(jk_env_t *env, char *host, - short port, - jk_channel_socket_private_t *rc); - -static int JK_METHOD jk_channel_socket_close(jk_env_t *env, jk_channel_t *_this, - jk_endpoint_t *endpoint); - -static int JK_METHOD jk_channel_socket_getProperty(jk_env_t *env, - jk_channel_t *_this, - char *name, char **value) +int JK_METHOD jk2_channel_socket_factory(jk_env_t *env, jk_pool_t *pool, + void **result, + const char *type, const char *name); + +static int JK_METHOD jk2_channel_socket_resolve(jk_env_t *env, char *host, + short port, + jk_channel_socket_private_t *rc); + +static int JK_METHOD jk2_channel_socket_close(jk_env_t *env, jk_channel_t *_this, + jk_endpoint_t *endpoint); + +static int JK_METHOD jk2_channel_socket_getProperty(jk_env_t *env, + jk_channel_t *_this, + char *name, char **value) { return JK_FALSE; } -static int JK_METHOD jk_channel_socket_setProperty(jk_env_t *env, +static int JK_METHOD jk2_channel_socket_setProperty(jk_env_t *env, jk_channel_t *_this, char *name, char *value) { @@ -156,7 +156,7 @@ /** resolve the host IP ( jk_resolve ) and initialize the channel. */ -static int JK_METHOD jk_channel_socket_init(jk_env_t *env, +static int JK_METHOD jk2_channel_socket_init(jk_env_t *env, jk_channel_t *_this, jk_map_t *props, char *worker_name, @@ -170,12 +170,12 @@ jk_workerEnv_t *workerEnv=worker->workerEnv; char *tmp; - host = jk_map_getStrProp( env, props, + host = jk2_map_getStrProp( env, props, "worker", worker_name, "host", host); - tmp = jk_map_getStrProp( env, props, + tmp = jk2_map_getStrProp( env, props, "worker", worker_name, "port", NULL ); if( tmp != NULL ) - port=jk_map_str2int( env, tmp); + port=jk2_map_str2int( env, tmp); _this->worker=worker; _this->properties=props; @@ -183,9 +183,9 @@ if( host==NULL ) host=DEFAULT_HOST; - err=jk_channel_socket_resolve( env, host, port, socketInfo ); + err=jk2_channel_socket_resolve( env, host, port, socketInfo ); if( err!= JK_TRUE ) { - env->l->jkLog(env, env->l, JK_LOG_ERROR, "jk_channel_socket_init: " + env->l->jkLog(env, env->l, JK_LOG_ERROR, "jk2_channel_socket_init: " "can't resolve %s:%d errno=%d\n", host, port, errno ); } env->l->jkLog(env, env->l, JK_LOG_INFO, @@ -197,7 +197,7 @@ /** private: resolve the address on init */ -static int JK_METHOD jk_channel_socket_resolve(jk_env_t *env, +static int JK_METHOD jk2_channel_socket_resolve(jk_env_t *env, char *host, short port, jk_channel_socket_private_t *rc) { @@ -206,7 +206,7 @@ * otherwise it is a TCP/IP socket. */ env->l->jkLog(env, env->l, JK_LOG_ERROR, - "jk_channel_socket_resolve: %s %d\n", + "jk2_channel_socket_resolve: %s %d\n", host, port); if (host[0]=='/') { rc->type = TYPE_UNIX; @@ -226,7 +226,7 @@ /** connect to Tomcat (jk_open_socket) */ -static int JK_METHOD jk_channel_socket_open(jk_env_t *env, +static int JK_METHOD jk2_channel_socket_open(jk_env_t *env, jk_channel_t *_this, jk_endpoint_t *endpoint) { @@ -298,7 +298,7 @@ "channelSocket.open() connect on %d\n",sock); ret = apr_connect(sock, remote_sa); env->l->jkLog(env, env->l, JK_LOG_ERROR, - "jk_channel_socket_open:%d\n",ret); + "jk2_channel_socket_open:%d\n",ret); } while (ret == APR_EINTR); @@ -335,9 +335,9 @@ } -/** close the socket ( was: jk_close_socket ) +/** close the socket ( was: jk2_close_socket ) */ -static int JK_METHOD jk_channel_socket_close(jk_env_t *env,jk_channel_t *_this, +static int JK_METHOD jk2_channel_socket_close(jk_env_t *env,jk_channel_t *_this, jk_endpoint_t *endpoint) { apr_socket_t *sd; @@ -373,7 +373,7 @@ * protocol. * @was: jk_tcp_socket_sendfull */ -static int JK_METHOD jk_channel_socket_send(jk_env_t *env, jk_channel_t *_this, +static int JK_METHOD jk2_channel_socket_send(jk_env_t *env, jk_channel_t *_this, jk_endpoint_t *endpoint, jk_msg_t *msg) { @@ -401,14 +401,14 @@ unixsock=chD->unixsock; env->l->jkLog(env, env->l, JK_LOG_ERROR, - "jk_channel_socket_send %d\n",chD->type); + "jk2_channel_socket_send %d\n",chD->type); if (chD->type==TYPE_NET) { length = (apr_size_t) len; stat = apr_send(sock, b, &length); if (stat!= APR_SUCCESS) { env->l->jkLog(env, env->l, JK_LOG_ERROR, - "jk_channel_socket_send send failed %d %s\n", + "jk2_channel_socket_send send failed %d %s\n", stat, apr_strerror( stat, data, sizeof(data) ) ); return -3; /* -2 is not possible... */ } @@ -439,7 +439,7 @@ * >0: length of the received data. * Was: tcp_socket_recvfull */ -static int JK_METHOD jk_channel_apr_readN( jk_env_t *env, +static int JK_METHOD jk2_channel_apr_readN( jk_env_t *env, jk_channel_t *_this, jk_endpoint_t *endpoint, char *b, int len ) @@ -500,7 +500,7 @@ * >0: length of the received data. * Was: tcp_socket_recvfull */ -static int JK_METHOD jk_channel_socket_recv( jk_env_t *env, jk_channel_t *_this, +static int JK_METHOD jk2_channel_socket_recv( jk_env_t *env, jk_channel_t *_this, jk_endpoint_t *endpoint, jk_msg_t *msg ) { @@ -509,7 +509,7 @@ int rc; - jk_channel_apr_readN( env, _this, endpoint, msg->buf, hlen ); + jk2_channel_apr_readN( env, _this, endpoint, msg->buf, hlen ); blen=msg->checkHeader( env, msg, endpoint ); if( blen < 0 ) { @@ -518,7 +518,7 @@ return JK_FALSE; } - rc= jk_channel_apr_readN( env, _this, endpoint, msg->buf + hlen, blen); + rc= jk2_channel_apr_readN( env, _this, endpoint, msg->buf + hlen, blen); if(rc < 0) { env->l->jkLog(env, env->l, JK_LOG_ERROR, @@ -535,7 +535,7 @@ } -int JK_METHOD jk_channel_apr_socket_factory(jk_env_t *env, +int JK_METHOD jk2_channel_apr_socket_factory(jk_env_t *env, jk_pool_t *pool, void **result, const char *type, const char *name) @@ -552,13 +552,13 @@ _this->_privatePtr= (jk_channel_socket_private_t *) pool->calloc( env, pool, sizeof( jk_channel_socket_private_t)); - _this->recv= jk_channel_socket_recv; - _this->send= jk_channel_socket_send; - _this->init= jk_channel_socket_init; - _this->open= jk_channel_socket_open; - _this->close= jk_channel_socket_close; - _this->getProperty= jk_channel_socket_getProperty; - _this->setProperty= jk_channel_socket_setProperty; + _this->recv= jk2_channel_socket_recv; + _this->send= jk2_channel_socket_send; + _this->init= jk2_channel_socket_init; + _this->open= jk2_channel_socket_open; + _this->close= jk2_channel_socket_close; + _this->getProperty= jk2_channel_socket_getProperty; + _this->setProperty= jk2_channel_socket_setProperty; _this->supportedProperties=( char ** )pool->alloc( env, pool, 4 * sizeof( char * )); 1.3 +39 -39 jakarta-tomcat-connectors/jk/native2/common/jk_channel_jni.c Index: jk_channel_jni.c =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_channel_jni.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- jk_channel_jni.c 26 Jan 2002 06:55:17 -0000 1.2 +++ jk_channel_jni.c 21 Feb 2002 11:09:31 -0000 1.3 @@ -99,16 +99,16 @@ } jk_ch_jni_ep_private_t; -int JK_METHOD jk_channel_jni_factory(jk_env_t *env, jk_pool_t *pool, - void **result, - const char *type, const char *name); +int JK_METHOD jk2_channel_jni_factory(jk_env_t *env, jk_pool_t *pool, + void **result, + const char *type, const char *name); -static int JK_METHOD jk_channel_jni_init(jk_env_t *env, - jk_channel_t *_this, - jk_map_t *props, - char *worker_name, - jk_worker_t *worker ) +static int JK_METHOD jk2_channel_jni_init(jk_env_t *env, + jk_channel_t *_this, + jk_map_t *props, + char *worker_name, + jk_worker_t *worker ) { int err; char *tmp; @@ -132,9 +132,9 @@ /** Assume the jni-worker or someone else started * tomcat and initialized what is needed. */ -static int JK_METHOD jk_channel_jni_open(jk_env_t *env, - jk_channel_t *_this, - jk_endpoint_t *endpoint) +static int JK_METHOD jk2_channel_jni_open(jk_env_t *env, + jk_channel_t *_this, + jk_endpoint_t *endpoint) { jk_workerEnv_t *we=endpoint->worker->workerEnv; JNIEnv *jniEnv; @@ -257,8 +257,8 @@ /** */ -static int JK_METHOD jk_channel_jni_close(jk_env_t *env,jk_channel_t *_this, - jk_endpoint_t *endpoint) +static int JK_METHOD jk2_channel_jni_close(jk_env_t *env,jk_channel_t *_this, + jk_endpoint_t *endpoint) { jk_ch_jni_ep_private_t *epData; @@ -282,9 +282,9 @@ * protocol. * @was: jk_tcp_socket_sendfull */ -static int JK_METHOD jk_channel_jni_send(jk_env_t *env, jk_channel_t *_this, - jk_endpoint_t *endpoint, - jk_msg_t *msg) +static int JK_METHOD jk2_channel_jni_send(jk_env_t *env, jk_channel_t *_this, + jk_endpoint_t *endpoint, + jk_msg_t *msg) { int sd; int sent=0; @@ -302,7 +302,7 @@ env->l->jkLog(env, env->l, JK_LOG_INFO,"channel_jni.send()\n" ); if( epData == NULL ) { - jk_channel_jni_open( env, _this, endpoint ); + jk2_channel_jni_open( env, _this, endpoint ); epData=(jk_ch_jni_ep_private_t *)endpoint->channelData; } @@ -375,9 +375,9 @@ * java side will send messages by calling a native method, which will * receive and dispatch. */ -static int JK_METHOD jk_channel_jni_recv( jk_env_t *env, jk_channel_t *_this, - jk_endpoint_t *endpoint, - jk_msg_t *msg ) +static int JK_METHOD jk2_channel_jni_recv(jk_env_t *env, jk_channel_t *_this, + jk_endpoint_t *endpoint, + jk_msg_t *msg) { jbyte *nbuf; jbyteArray jbuf; @@ -412,7 +412,7 @@ /* Process a message from java. We return in all cases, with the response message if any. */ -static int jk_channel_jni_processMsg( jk_env_t *env, jk_endpoint_t *e, +static int jk2_channel_jni_processMsg(jk_env_t *env, jk_endpoint_t *e, jk_ws_service_t *r) { int code; @@ -472,9 +472,9 @@ /* */ -int jk_channel_jni_javaSendPacket(JNIEnv *jniEnv, jobject o, - jlong envJ, jlong eP, jlong s, - jbyteArray data, jint dataLen) +int jk2_channel_jni_javaSendPacket(JNIEnv *jniEnv, jobject o, + jlong envJ, jlong eP, jlong s, + jbyteArray data, jint dataLen) { /* [V] Convert indirectly from jlong -> int -> pointer to shut up gcc */ /* I hope it's okay on other compilers and/or machines... */ @@ -527,7 +527,7 @@ /* XXX check if the len in header matches our len */ /* Now execute it */ - jk_channel_jni_processMsg( env, e, ps ); + jk2_channel_jni_processMsg( env, e, ps ); (*jniEnv)->ReleaseByteArrayElements(jniEnv, data, nbuf, 0); @@ -543,11 +543,11 @@ /** Called before request processing, to initialize resources. All following calls will be in the same thread. */ -int JK_METHOD jk_channel_jni_beforeRequest(struct jk_env *env, - jk_channel_t *_this, - struct jk_worker *worker, - struct jk_endpoint *endpoint, - struct jk_ws_service *r ) +int JK_METHOD jk2_channel_jni_beforeRequest(struct jk_env *env, + jk_channel_t *_this, + struct jk_worker *worker, + struct jk_endpoint *endpoint, + struct jk_ws_service *r ) { JNIEnv *jniEnv; jint rc; @@ -578,7 +578,7 @@ /** Called after request processing. Used to be worker.done() */ -int JK_METHOD jk_channel_jni_afterRequest(struct jk_env *env, +int JK_METHOD jk2_channel_jni_afterRequest(struct jk_env *env, jk_channel_t *_this, struct jk_worker *worker, struct jk_endpoint *endpoint, @@ -597,7 +597,7 @@ -int JK_METHOD jk_channel_jni_factory(jk_env_t *env, +int JK_METHOD jk2_channel_jni_factory(jk_env_t *env, jk_pool_t *pool, void **result, const char *type, const char *name) @@ -611,14 +611,14 @@ } _this=(jk_channel_t *)pool->calloc(env, pool, sizeof( jk_channel_t)); - _this->recv= jk_channel_jni_recv; - _this->send= jk_channel_jni_send; - _this->init= jk_channel_jni_init; - _this->open= jk_channel_jni_open; - _this->close= jk_channel_jni_close; + _this->recv= jk2_channel_jni_recv; + _this->send= jk2_channel_jni_send; + _this->init= jk2_channel_jni_init; + _this->open= jk2_channel_jni_open; + _this->close= jk2_channel_jni_close; - _this->beforeRequest= jk_channel_jni_beforeRequest; - _this->afterRequest= jk_channel_jni_afterRequest; + _this->beforeRequest= jk2_channel_jni_beforeRequest; + _this->afterRequest= jk2_channel_jni_afterRequest; _this->name="jni"; 1.13 +31 -31 jakarta-tomcat-connectors/jk/native2/common/jk_channel_socket.c Index: jk_channel_socket.c =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_channel_socket.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- jk_channel_socket.c 26 Jan 2002 07:05:19 -0000 1.12 +++ jk_channel_socket.c 21 Feb 2002 11:09:31 -0000 1.13 @@ -110,25 +110,25 @@ XXX We could also use properties or 'notes' */ -int JK_METHOD jk_channel_socket_factory(jk_env_t *env, jk_pool_t *pool, +int JK_METHOD jk2_channel_socket_factory(jk_env_t *env, jk_pool_t *pool, void **result, const char *type, const char *name); -static int JK_METHOD jk_channel_socket_resolve(jk_env_t *env, char *host, +static int JK_METHOD jk2_channel_socket_resolve(jk_env_t *env, char *host, short port, struct sockaddr_in *rc); -static int JK_METHOD jk_channel_socket_close(jk_env_t *env, jk_channel_t *_this, +static int JK_METHOD jk2_channel_socket_close(jk_env_t *env, jk_channel_t *_this, jk_endpoint_t *endpoint); -static int JK_METHOD jk_channel_socket_getProperty(jk_env_t *env, +static int JK_METHOD jk2_channel_socket_getProperty(jk_env_t *env, jk_channel_t *_this, char *name, char **value) { return JK_FALSE; } -static int JK_METHOD jk_channel_socket_setProperty(jk_env_t *env, +static int JK_METHOD jk2_channel_socket_setProperty(jk_env_t *env, jk_channel_t *_this, char *name, char *value) { @@ -147,7 +147,7 @@ /** resolve the host IP ( jk_resolve ) and initialize the channel. */ -static int JK_METHOD jk_channel_socket_init(jk_env_t *env, +static int JK_METHOD jk2_channel_socket_init(jk_env_t *env, jk_channel_t *_this, jk_map_t *props, char *worker_name, @@ -162,12 +162,12 @@ jk_workerEnv_t *workerEnv=worker->workerEnv; char *tmp; - host = jk_map_getStrProp( env, props, + host = jk2_map_getStrProp( env, props, "worker", worker_name, "host", host); - tmp = jk_map_getStrProp( env, props, + tmp = jk2_map_getStrProp( env, props, "worker", worker_name, "port", "8007" ); if( tmp != NULL ) - port=jk_map_str2int( env, tmp); + port=jk2_map_str2int( env, tmp); _this->worker=worker; _this->properties=props; @@ -175,9 +175,9 @@ if( host==NULL ) host=DEFAULT_HOST; - err=jk_channel_socket_resolve( env, host, port, rc ); + err=jk2_channel_socket_resolve( env, host, port, rc ); if( err!= JK_TRUE ) { - env->l->jkLog(env, env->l, JK_LOG_ERROR, "jk_channel_socket_init: " + env->l->jkLog(env, env->l, JK_LOG_ERROR, "jk2_channel_socket_init: " "can't resolve %s:%d errno=%d\n", host, port, errno ); } env->l->jkLog(env, env->l, JK_LOG_INFO, @@ -189,7 +189,7 @@ /** private: resolve the address on init */ -static int JK_METHOD jk_channel_socket_resolve(jk_env_t *env, char *host, short port, +static int JK_METHOD jk2_channel_socket_resolve(jk_env_t *env, char *host, short port, struct sockaddr_in *rc) { int x; @@ -222,7 +222,7 @@ return JK_TRUE; } -static int jk_close_socket(jk_env_t *env, int s) +static int jk2_close_socket(jk_env_t *env, int s) { #ifdef WIN32 if(INVALID_SOCKET != s) { @@ -240,7 +240,7 @@ /** connect to Tomcat (jk_open_socket) */ -static int JK_METHOD jk_channel_socket_open(jk_env_t *env, +static int JK_METHOD jk2_channel_socket_open(jk_env_t *env, jk_channel_t *_this, jk_endpoint_t *endpoint) { @@ -284,7 +284,7 @@ /* Check if we connected */ if(ret != 0 ) { - jk_close_socket(env, sock); + jk2_close_socket(env, sock); env->l->jkLog(env, env->l, JK_LOG_ERROR, "channelSocket.connect() connect failed %d %s\n", errno, strerror( errno ) ); @@ -313,9 +313,9 @@ } -/** close the socket ( was: jk_close_socket ) +/** close the socket ( was: jk2_close_socket ) */ -static int JK_METHOD jk_channel_socket_close(jk_env_t *env,jk_channel_t *_this, +static int JK_METHOD jk2_channel_socket_close(jk_env_t *env,jk_channel_t *_this, jk_endpoint_t *endpoint) { int sd; @@ -328,7 +328,7 @@ /* nothing else to clean, the socket_data was allocated ouf of * endpoint's pool */ - return jk_close_socket(env, sd); + return jk2_close_socket(env, sd); } /** send a long message @@ -342,7 +342,7 @@ * protocol. * @was: jk_tcp_socket_sendfull */ -static int JK_METHOD jk_channel_socket_send(jk_env_t *env, jk_channel_t *_this, +static int JK_METHOD jk2_channel_socket_send(jk_env_t *env, jk_channel_t *_this, jk_endpoint_t *endpoint, jk_msg_t *msg) { @@ -384,7 +384,7 @@ * >0: length of the received data. * Was: tcp_socket_recvfull */ -static int JK_METHOD jk_channel_socket_readN( jk_env_t *env, +static int JK_METHOD jk2_channel_socket_readN( jk_env_t *env, jk_channel_t *_this, jk_endpoint_t *endpoint, char *b, int len ) @@ -432,7 +432,7 @@ * >0: length of the received data. * Was: tcp_socket_recvfull */ -static int JK_METHOD jk_channel_socket_recv( jk_env_t *env, jk_channel_t *_this, +static int JK_METHOD jk2_channel_socket_recv( jk_env_t *env, jk_channel_t *_this, jk_endpoint_t *endpoint, jk_msg_t *msg ) { @@ -441,7 +441,7 @@ int rc; - jk_channel_socket_readN( env, _this, endpoint, msg->buf, hlen ); + jk2_channel_socket_readN( env, _this, endpoint, msg->buf, hlen ); blen=msg->checkHeader( env, msg, endpoint ); if( blen < 0 ) { @@ -450,7 +450,7 @@ return JK_FALSE; } - rc= jk_channel_socket_readN( env, _this, endpoint, msg->buf + hlen, blen); + rc= jk2_channel_socket_readN( env, _this, endpoint, msg->buf + hlen, blen); if(rc < 0) { env->l->jkLog(env, env->l, JK_LOG_ERROR, @@ -468,7 +468,7 @@ -int JK_METHOD jk_channel_socket_factory(jk_env_t *env, +int JK_METHOD jk2_channel_socket_factory(jk_env_t *env, jk_pool_t *pool, void **result, const char *type, const char *name) @@ -485,13 +485,13 @@ _this->_privatePtr= (jk_channel_socket_private_t *) pool->calloc( env, pool, sizeof( jk_channel_socket_private_t)); - _this->recv= jk_channel_socket_recv; - _this->send= jk_channel_socket_send; - _this->init= jk_channel_socket_init; - _this->open= jk_channel_socket_open; - _this->close= jk_channel_socket_close; - _this->getProperty= jk_channel_socket_getProperty; - _this->setProperty= jk_channel_socket_setProperty; + _this->recv= jk2_channel_socket_recv; + _this->send= jk2_channel_socket_send; + _this->init= jk2_channel_socket_init; + _this->open= jk2_channel_socket_open; + _this->close= jk2_channel_socket_close; + _this->getProperty= jk2_channel_socket_getProperty; + _this->setProperty= jk2_channel_socket_setProperty; _this->supportedProperties=( char ** )pool->alloc( env, pool, 4 * sizeof( char * ));
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>