void xlat_free(void);
/* threads.c */
-extern int thread_pool_init(CONF_SECTION *cs, int *spawn_flag);
+extern int thread_pool_init(CONF_SECTION *cs, bool *spawn_flag);
extern void thread_pool_stop(void);
extern int thread_pool_addrequest(REQUEST *, RAD_REQUEST_FUNP);
extern pid_t rad_fork(void);
/* listen.c */
void listen_free(rad_listen_t **head);
-int listen_init(CONF_SECTION *cs, rad_listen_t **head, int spawn_flag);
+int listen_init(CONF_SECTION *cs, rad_listen_t **head, bool spawn_flag);
rad_listen_t *proxy_new_listener(home_server_t *home, int src_port);
RADCLIENT *client_listener_find(rad_listen_t *listener,
fr_ipaddr_t const *ipaddr, int src_port);
int rad_status_server(REQUEST *request);
/* event.c */
-int radius_event_init(CONF_SECTION *cs, int spawn_flag);
+int radius_event_init(CONF_SECTION *cs, bool spawn_flag);
void radius_event_free(void);
int radius_event_process(void);
int event_new_fd(rad_listen_t *listener);
*/
int listen_init(CONF_SECTION *config, rad_listen_t **head,
#ifdef WITH_TLS
- int spawn_flag
+ bool spawn_flag
#else
- UNUSED int spawn_flag
+ UNUSED bool spawn_flag
#endif
)
extern bool check_config;
extern fr_cond_t *debug_condition;
-static int spawn_flag = 0;
-static int just_started = true;
+static bool spawn_flag = false;
+static bool just_started = true;
time_t fr_start_time;
static fr_packet_list_t *pl = NULL;
static fr_event_list_t *el = NULL;
/*
* Externally-visibly functions.
*/
-int radius_event_init(CONF_SECTION *cs, int have_children)
+int radius_event_init(CONF_SECTION *cs, bool have_children)
{
rad_listen_t *head = NULL;
}
#endif
+ /*
+ * Move all of the thread calls to this file?
+ *
+ * It may be best for the mutexes to be in this file...
+ */
+ spawn_flag = have_children;
+
#ifdef HAVE_PTHREAD_H
NO_SUCH_CHILD_PID = pthread_self(); /* not a child thread */
* we're running normally.
*/
if (have_children && !check_config &&
- (thread_pool_init(cs, &have_children) < 0)) {
+ (thread_pool_init(cs, &spawn_flag) < 0)) {
fr_exit(1);
}
#endif
- /*
- * Move all of the thread calls to this file?
- *
- * It may be best for the mutexes to be in this file...
- */
- spawn_flag = have_children;
-
if (check_config) {
DEBUG("%s: #### Skipping IP addresses and Ports ####",
mainconfig.name);
int cleanup_delay;
int stop_flag;
#endif /* WITH_GCD */
- int spawn_flag;
+ bool spawn_flag;
#ifdef WNOHANG
pthread_mutex_t wait_mutex;
*
* FIXME: What to do on a SIGHUP???
*/
-int thread_pool_init(UNUSED CONF_SECTION *cs, int *spawn_flag)
+int thread_pool_init(UNUSED CONF_SECTION *cs, bool *spawn_flag)
{
#ifndef WITH_GCD
int i, rcode;