/*
+ * $Id$
+ *
* Citadel/UX "system dependent" stuff.
* See copyright.txt for copyright information.
*
- * $Id$
- *
- * Here's where we (hopefully) have all the parts of the Citadel server that
+ * Here's where we (hopefully) have most parts of the Citadel server that
* would need to be altered to run the server in a non-POSIX environment.
*
* Eventually we'll try porting to a different platform and either have
* multiple variants of this file or simply load it up with #ifdefs.
+ *
*/
/*
* Bind the server to our favorite ports.
*/
- CtdlRegisterServiceHook(config.c_port_number, /* TCP */
- NULL,
- citproto_begin_session,
- do_command_loop);
CtdlRegisterServiceHook(0, /* Unix */
"citadel.socket",
citproto_begin_session,
do_command_loop);
+ CtdlRegisterServiceHook(config.c_port_number, /* TCP */
+ NULL,
+ citproto_begin_session,
+ do_command_loop);
/*
* Load any server-side modules (plugins) available here.
for (serviceptr = ServiceHookTable; serviceptr != NULL;
serviceptr = serviceptr->next ) {
+ lprintf(9, "Will listen on master socket %d\n",
+ serviceptr->msock);
FD_SET(serviceptr->msock, &masterfds);
if (serviceptr->msock > masterhighest) {
masterhighest = serviceptr->msock;
* thread that the &readfds needs to be refreshed with more
* current data.
*/
- if (!time_to_die) if (FD_ISSET(rescan[0], &readfds)) {
+ if (time_to_die)
+ break;
+
+ if (FD_ISSET(rescan[0], &readfds)) {
read(rescan[0], &junk, 1);
goto SETUP_FD;
}