in mod_ftp, we are checking that there is one free worker...
int ftp_check_maxclients(request_rec *r)
{
int hard_server_limit, hard_thread_limit;
int i, j;
worker_score *scoreboard;
ap_mpm_query(AP_MPMQ_HARD_LIMIT_DAEMONS, &hard_server_limit);
ap_mpm_query(AP_MPMQ_HARD_LIMIT_THREADS, &hard_thread_limit);
for (i = 0; i < hard_server_limit; i++) {
for (j = 0; j < hard_thread_limit; j++) {
#if ((AP_SERVER_MAJORVERSION_NUMBER < 3) &&
(AP_SERVER_MINORVERSION_NUMBER < 3))
scoreboard = ap_get_scoreboard_worker(i, j);
#else
scoreboard = ap_get_scoreboard_worker_from_indexes(i, j);
#endif
if (scoreboard->status == SERVER_READY)
return 0;
}
}
[...]
Shouldn't the query be
ap_mpm_query(AP_MPMQ_MAX_DAEMONS, &hard_server_limit);
ap_mpm_query(AP_MPMQ_MAX_THREADS, &hard_thread_limit);
instead? (We could probably drop the hard_ prefix from var names.)