int rc;
struct iovec *vec;
int i;
- int total_bytes = 0;
vec = (struct iovec *)apr_palloc(r->pool, count * sizeof(struct iovec));
va_start(ap, count);
for (i = 0; i < count; i++) {
vec[i].iov_base = va_arg(ap, caddr_t);
vec[i].iov_len = va_arg(ap, apr_size_t);
- total_bytes += vec[i].iov_len;
}
va_end(ap);
static apr_status_t cleanup_slotmem(void *param)
{
ap_slotmem_instance_t **mem = param;
- apr_status_t rv;
apr_pool_t *pool = NULL;
if (*mem) {
pool = next->gpool;
while (next) {
store_slotmem(next);
- rv = apr_shm_destroy((apr_shm_t *)next->shm);
+ apr_shm_destroy((apr_shm_t *)next->shm);
next = next->next;
}
apr_pool_destroy(pool);
SSL *ssl;
conn_rec *c;
server_rec *s;
- SSLSrvConfigRec *sc;
if ((ssl = (SSL *)BIO_get_callback_arg(bio)) == NULL)
return rc;
if ((c = (conn_rec *)SSL_get_app_data(ssl)) == NULL)
return rc;
s = mySrvFromConn(c);
- sc = mySrvConfig(s);
if ( cmd == (BIO_CB_WRITE|BIO_CB_RETURN)
|| cmd == (BIO_CB_READ |BIO_CB_RETURN) ) {
char *an;
char *cp;
apr_time_t pkey_mtime = 0;
- int isterm = 1;
apr_status_t rv;
/*
* Start with a fresh pass phrase array
*/
if (cpPassPhraseCur == NULL) {
if (nPassPhraseDialogCur && pkey_mtime &&
- !(isterm = isatty(fileno(stdout)))) /* XXX: apr_isatty() */
+ !isatty(fileno(stdout))) /* XXX: apr_isatty() */
{
ap_log_error(APLOG_MARK, APLOG_ERR, 0,
pServ,
ssl_randseed_t *pRandSeeds;
ssl_randseed_t *pRandSeed;
unsigned char stackdata[256];
- int nReq, nDone;
+ int nDone;
apr_file_t *fp;
int i, n, l;
mc = myModConfig(s);
- nReq = 0;
nDone = 0;
apRandSeed = mc->aRandSeed;
pRandSeeds = (ssl_randseed_t *)apRandSeed->elts;
for (i = 0; i < apRandSeed->nelts; i++) {
pRandSeed = &pRandSeeds[i];
if (pRandSeed->nCtx == nCtx) {
- nReq += pRandSeed->nBytes;
if (pRandSeed->nSrc == SSL_RSSRC_FILE) {
/*
* seed in contents of an external file
ap_server_conf,
"event_loop: unexpected state %d",
cs->state);
- AP_DEBUG_ASSERT(0);
}
apr_thread_mutex_lock(timeout_mutex);
queue_info->idlers_mutex);
if (rv != APR_SUCCESS) {
apr_status_t rv2;
- AP_DEBUG_ASSERT(0);
rv2 = apr_thread_mutex_unlock(queue_info->idlers_mutex);
if (rv2 != APR_SUCCESS) {
return rv2;
{
ap_listen_rec *lr, *first_lr, *last_lr = NULL;
apr_pool_t *ptrans;
- apr_pool_t *pbucket;
apr_allocator_t *allocator;
apr_bucket_alloc_t *bucket_alloc;
conn_rec *current_conn;
static void perform_idle_server_maintenance(apr_pool_t *p)
{
int i;
- int to_kill;
int idle_count;
worker_score *ws;
int free_length;
/* initialize the free_list */
free_length = 0;
- to_kill = -1;
idle_count = 0;
last_non_dead = -1;
total_non_dead = 0;
*/
if (status <= WORKER_READY) {
++ idle_count;
- /* always kill the highest numbered child if we have to...
- * no really well thought out reason ... other than observing
- * the server behaviour under linux where lower numbered children
- * tend to service more hits (and hence are more likely to have
- * their data in cpu caches).
- */
- to_kill = i;
}
++total_non_dead;
static int netware_pre_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp)
{
- int debug;
char *addrname = NULL;
mpm_state = AP_MPMQ_STARTING;
- debug = ap_exists_config_define("DEBUG");
-
is_graceful = 0;
ap_my_pid = getpid();
addrname = getaddressspacename (NULL, NULL);
static void perform_idle_server_maintenance(apr_pool_t *p)
{
int i;
- int to_kill;
int idle_count;
worker_score *ws;
int free_length;
/* initialize the free_list */
free_length = 0;
- to_kill = -1;
idle_count = 0;
last_non_dead = -1;
total_non_dead = 0;
*/
if (status <= SERVER_READY) {
++ idle_count;
- /* always kill the highest numbered child if we have to...
- * no really well thought out reason ... other than observing
- * the server behaviour under linux where lower numbered children
- * tend to service more hits (and hence are more likely to have
- * their data in cpu caches).
- */
- to_kill = i;
}
++total_non_dead;
const char *ap_mpm_set_coredumpdir(cmd_parms *cmd, void *dummy,
const char *arg)
{
- apr_status_t rv;
apr_finfo_t finfo;
const char *fname;
const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
return apr_pstrcat(cmd->pool, "Invalid CoreDumpDirectory path ",
arg, NULL);
}
- if ((rv = apr_stat(&finfo, fname, APR_FINFO_TYPE, cmd->pool)) != APR_SUCCESS) {
+ if (apr_stat(&finfo, fname, APR_FINFO_TYPE, cmd->pool) != APR_SUCCESS) {
return apr_pstrcat(cmd->pool, "CoreDumpDirectory ", fname,
" does not exist", NULL);
}
apr_status_t rv;
pid_t otherpid;
int running = 0;
- int have_pid_file = 0;
const char *status;
*exit_status = 0;
status = "httpd (no pid file) not running";
}
else {
- have_pid_file = 1;
if (kill(otherpid, 0) == 0) {
running = 1;
status = apr_psprintf(pconf,
apr_getopt_t *opt;
char optbuf[3];
const char *optarg;
- int fixed_args;
mpm_new_argv = apr_array_make(process->pool, process->argc,
sizeof(const char **));
*(const char **)apr_array_push(mpm_new_argv) = process->argv[0];
- fixed_args = mpm_new_argv->nelts;
apr_getopt_init(&opt, process->pool, process->argc, process->argv);
opt->errfn = NULL;
optbuf[0] = '-';
static int resolve_symlink(char *d, apr_finfo_t *lfi, int opts, apr_pool_t *p)
{
apr_finfo_t fi;
- int res;
const char *savename;
if (!(opts & (OPT_SYM_OWNER | OPT_SYM_LINKS))) {
/* if OPT_SYM_OWNER is unset, we only need to check target accessible */
if (!(opts & OPT_SYM_OWNER)) {
- if ((res = apr_stat(&fi, d, lfi->valid & ~(APR_FINFO_NAME
- | APR_FINFO_LINK), p))
- != APR_SUCCESS) {
+ if (apr_stat(&fi, d, lfi->valid & ~(APR_FINFO_NAME | APR_FINFO_LINK), p)
+ != APR_SUCCESS)
+ {
return HTTP_FORBIDDEN;
}
* owner of the symlink, then get the info of the target.
*/
if (!(lfi->valid & APR_FINFO_OWNER)) {
- if ((res = apr_stat(lfi, d,
- lfi->valid | APR_FINFO_LINK | APR_FINFO_OWNER, p))
- != APR_SUCCESS) {
+ if (apr_stat(lfi, d, lfi->valid | APR_FINFO_LINK | APR_FINFO_OWNER, p)
+ != APR_SUCCESS)
+ {
return HTTP_FORBIDDEN;
}
}
- if ((res = apr_stat(&fi, d, lfi->valid & ~(APR_FINFO_NAME), p))
- != APR_SUCCESS) {
+ if (apr_stat(&fi, d, lfi->valid & ~(APR_FINFO_NAME), p) != APR_SUCCESS) {
return HTTP_FORBIDDEN;
}
apr_status_t ap_init_ebcdic(apr_pool_t *pool)
{
apr_status_t rv;
- char buf[80];
rv = apr_xlate_open(&ap_hdrs_to_ascii, "ISO-8859-1", APR_DEFAULT_CHARSET, pool);
if (rv) {