/* 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 "httpd.h"
#include "http_config.h"
#include "http_log.h"
#include "apr_strings.h"
#include "ap_mpm.h"
#include "scoreboard.h"
#include "mod_watchdog.h"
#ifndef HEARTBEAT_INTERVAL
#endif
typedef struct hb_ctx_t
{
int active;
int server_limit;
int thread_limit;
} hb_ctx_t;
{
int i, j;
for (i = 0; i < ctx->server_limit; i++) {
ps = ap_get_scoreboard_process(i);
for (j = 0; j < ctx->thread_limit; j++) {
int res;
ready++;
}
else if (res != SERVER_DEAD &&
busy++;
}
}
}
do {
SOCK_DGRAM, APR_PROTO_UDP, p);
if (rv) {
break;
}
if (rv) {
break;
}
if (rv) {
break;
}
} while (0);
if (sock) {
}
return OK;
}
{
return OK;
}
{
return OK;
}
{
return OK;
}
}
{
return OK;
else
return DECLINED;
}
{
}
{
return cfg;
}
{
char *host_str;
char *scope_id;
return err;
}
}
else {
return "HeartbeatAddress: May only be specified once.";
}
if (rv) {
return "HeartbeatAddress: Unable to parse address.";
}
return "HeartbeatAddress: No host provided in address";
}
if (port == 0) {
return "HeartbeatAddress: No port provided in address";
}
p);
if (rv) {
return "HeartbeatAddress: apr_sockaddr_info_get failed.";
}
return NULL;
}
"Address to send heartbeat requests"),
{NULL}
};
NULL, /* create per-directory config structure */
NULL, /* merge per-directory config structures */
hb_create_config, /* create per-server config structure */
NULL, /* merge per-server config structures */
hb_cmds, /* command apr_table_t */
};