--- hydra/src/boa.c 2002/09/27 07:03:45 1.7 +++ hydra/src/boa.c 2002/09/27 21:09:11 1.8 @@ -22,7 +22,7 @@ * */ -/* $Id: boa.c,v 1.7 2002/09/27 07:03:45 nmav Exp $*/ +/* $Id: boa.c,v 1.8 2002/09/27 21:09:11 nmav Exp $*/ #include "boa.h" #include "ssl.h" @@ -32,6 +32,7 @@ #endif extern int ssl_params_refresh; +int hic_write_fd; /* fd to write to HIC thread */ /* globals */ int backlog = SO_MAXCONN; @@ -43,6 +44,7 @@ /* static to boa.c */ static void fixup_server_root(void); static socket_type create_server_socket( int port, int); +static int hic_init(void); static void drop_privs(void); static server_params *smp_init(socket_type server_s[2]); static int sock_opt = 1; @@ -185,6 +187,8 @@ * by the children. */ block_main_signals(); + + hic_write_fd = hic_init(); /* spawn the children pool */ @@ -333,6 +337,47 @@ return; } +#ifdef ENABLE_HIC +#define hic_max_threads 1 +static int hic_fd[2]; + +/* This function will return a server_params pointer. This + * pointer is to be used as a pointer to the select loop. + */ +static int hic_init() +{ +//int *hic_fd[2]; + +#ifdef ENABLE_SMP +pthread_t tid; + + if (pipe( hic_fd) == -1) { + log_error_time(); + fprintf(stderr, "Error in pipe() for hic_fd.\n"); + exit(1); + } + +// for( i=0;i