From 9401f816dd0d9d550fe98a8507224bde51c4b847 Mon Sep 17 00:00:00 2001 From: hongbotian Date: Mon, 30 Nov 2015 02:41:33 -0500 Subject: upload tomcat JIRA: BOTTLENECK-7 Change-Id: I875d474869efd76ca203c30b60ebc0c3ee606d0e Signed-off-by: hongbotian --- .../native/common/jk_ajp13_worker.c | 94 ++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 rubbos/app/tomcat-connectors-1.2.32-src/native/common/jk_ajp13_worker.c (limited to 'rubbos/app/tomcat-connectors-1.2.32-src/native/common/jk_ajp13_worker.c') diff --git a/rubbos/app/tomcat-connectors-1.2.32-src/native/common/jk_ajp13_worker.c b/rubbos/app/tomcat-connectors-1.2.32-src/native/common/jk_ajp13_worker.c new file mode 100644 index 00000000..13e140ff --- /dev/null +++ b/rubbos/app/tomcat-connectors-1.2.32-src/native/common/jk_ajp13_worker.c @@ -0,0 +1,94 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/*************************************************************************** + * Description: Bi-directional protocol. * + * Author: Costin * + * Author: Gal Shachor * + * Author: Henri Gomez * + * Version: $Revision: 611589 $ * + ***************************************************************************/ + +#include "jk_ajp13_worker.h" + + +/* -------------------- Method -------------------- */ +static int JK_METHOD validate(jk_worker_t *pThis, + jk_map_t *props, + jk_worker_env_t *we, jk_logger_t *l) +{ + int rc; + JK_TRACE_ENTER(l); + rc = ajp_validate(pThis, props, we, l, AJP13_PROTO); + JK_TRACE_EXIT(l); + return rc; +} + + +static int JK_METHOD init(jk_worker_t *pThis, + jk_map_t *props, + jk_worker_env_t *we, jk_logger_t *l) +{ + int rc; + JK_TRACE_ENTER(l); + + rc = ajp_init(pThis, props, we, l, AJP13_PROTO); + JK_TRACE_EXIT(l); + return rc; +} + + +static int JK_METHOD destroy(jk_worker_t **pThis, jk_logger_t *l) +{ + int rc; + JK_TRACE_ENTER(l); + rc = ajp_destroy(pThis, l, AJP13_PROTO); + JK_TRACE_EXIT(l); + return rc; +} + + +static int JK_METHOD get_endpoint(jk_worker_t *pThis, + jk_endpoint_t **pend, jk_logger_t *l) +{ + int rc; + JK_TRACE_ENTER(l); + rc = ajp_get_endpoint(pThis, pend, l, AJP13_PROTO); + JK_TRACE_EXIT(l); + return rc; +} + +int JK_METHOD ajp13_worker_factory(jk_worker_t **w, + const char *name, jk_logger_t *l) +{ + ajp_worker_t *aw; + + JK_TRACE_ENTER(l); + if (ajp_worker_factory(w, name, l) == JK_FALSE) + return 0; + + aw = (*w)->worker_private; + aw->proto = AJP13_PROTO; + + aw->worker.validate = validate; + aw->worker.init = init; + aw->worker.get_endpoint = get_endpoint; + aw->worker.destroy = destroy; + + JK_TRACE_EXIT(l); + return JK_AJP13_WORKER_TYPE; +} -- cgit 1.2.3-korg