#define SECONDS_PER_DAY 86400
#define MAX_REQUEST_TIME 30
#define CLEANUP_DELAY 5
-#define MAX_REQUESTS 255
+#define MAX_REQUESTS 256
/* FIXME: these two should be command-line options */
#define RETRY_DELAY 5
#define RETRY_COUNT 3
#ifdef WITH_THREAD_POOL
/* threads.c */
extern int thread_pool_init(int num_threads);
-extern int thread_pool_check(void);
+extern int thread_pool_clean(void);
#endif
DEBUG2("Cleaning up request list after %d seconds",
(int) (curtime - last_cleaned_list));
+#ifdef WITH_THREAD_POOL
+ thread_pool_clean();
+#endif
+
/*
* When mucking around with the request list, we block
* asynchronous access (through the SIGCHLD handler) to
}
#endif
- max_requests = 255;
-
/*
* Count the total number of requests, to see if there
* are too many. If so, stop counting immediately,
#include "autoconf.h"
+#ifdef WITH_THREAD_POOL
+
#include <stdlib.h>
#include <string.h>
#include <errno.h>
# include <malloc.h>
#endif
-#ifdef WITH_THREAD_POOL
#include "radiusd.h"
#ifdef WITH_NEW_CONFIG
* If there are too many or too few threads waiting, then we
* either create some more, or delete some.
*/
-int thread_pool_check(void)
+int thread_pool_clean(void)
{
int spare;
int i, total;