ajp_utils.c revision 185aa71728867671e105178b4c66fbc22b65ae26
/* 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
*
*
* 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.
*/
#include "ajp.h"
/*
*/
request_rec *r,
{
"Into ajp_handle_cping_cpong");
if (rc != APR_SUCCESS) {
"ajp_handle_cping_cpong: ajp_msg_create failed");
return rc;
}
if (rc != APR_SUCCESS) {
"ajp_handle_cping_cpong: ajp_marshal_into_msgb failed");
return rc;
}
if (rc != APR_SUCCESS) {
"ajp_handle_cping_cpong: ajp_ilink_send failed");
return rc;
}
if (rc != APR_SUCCESS) {
"ajp_handle_cping_cpong: apr_socket_timeout_get failed");
return rc;
}
if (rc != APR_SUCCESS) {
"ajp_handle_cping_cpong: apr_socket_timeout_set failed");
return rc;
}
/* Read CPONG reply */
if (rv != APR_SUCCESS) {
"ajp_handle_cping_cpong: ajp_ilink_receive failed");
goto cleanup;
}
if (rv != APR_SUCCESS) {
"ajp_handle_cping_cpong: invalid CPONG message");
goto cleanup;
}
if (result != CMD_AJP13_CPONG) {
"ajp_handle_cping_cpong: awaited CPONG, received %d ",
result);
rv = APR_EGENERAL;
goto cleanup;
}
/* Restore original socket timeout */
if (rc != APR_SUCCESS) {
"ajp_handle_cping_cpong: apr_socket_timeout_set failed");
return rc;
}
"ajp_handle_cping_cpong: Done");
return rv;
}
#define case_to_str(x) case CMD_AJP13_##x:\
return #x;\
break;
/**�
* Convert numeric message type into string
* @param type AJP message type
* @return AJP message type as a string
*/
const char *ajp_type_str(int type)
{
switch (type) {
default:
return "CMD_AJP13_UNKNOWN";
}
}