]> code.citadel.org Git - citadel.git/blobdiff - citadel/sysdep.c
* Got bounce messages working (mostly ... testers, please beat this up!)
[citadel.git] / citadel / sysdep.c
index 5c613031302115215174eecb1c8d4a761a31afa0..904528aa7149042995bb4c2a708aa44336a5067c 100644 (file)
@@ -499,7 +499,7 @@ int client_gets(char *buf)
  * The system-dependent part of master_cleanup() - close the master socket.
  */
 void sysdep_master_cleanup(void) {
-       /* FIX close all protocol master sockets here */
+       /* FIXME close all protocol master sockets here */
 }
 
 
@@ -856,19 +856,9 @@ int main(int argc, char **argv)
 
        for (serviceptr = ServiceHookTable; serviceptr != NULL;
            serviceptr = serviceptr->next ) {
-               serviceptr->msock = ig_tcp_server(
-                       serviceptr->tcp_port, config.c_maxsessions);
-               if (serviceptr->msock >= 0) {
-                       FD_SET(serviceptr->msock, &masterfds);
-                       if (serviceptr->msock > masterhighest)
-                               masterhighest = serviceptr->msock;
-                       lprintf(7, "Bound to port %-5d (socket %d)\n",
-                               serviceptr->tcp_port,
-                               serviceptr->msock);
-               }
-               else {
-                       lprintf(1, "Unable to bind to port %d\n",
-                               serviceptr->tcp_port);
+               FD_SET(serviceptr->msock, &masterfds);
+               if (serviceptr->msock > masterhighest) {
+                       masterhighest = serviceptr->msock;
                }
        }
 
@@ -956,9 +946,6 @@ void worker_thread(void) {
 
        ++num_threads;
 
-       tv.tv_sec = 60;         /* wake up every minute if no input */
-       tv.tv_usec = 0;
-
        while (!time_to_die) {
 
                /* 
@@ -984,6 +971,8 @@ SETUP_FD:   memcpy(&readfds, &masterfds, sizeof(fd_set) );
                }
                end_critical_section(S_SESSION_TABLE);
 
+               tv.tv_sec = 60;         /* wake up every minute if no input */
+               tv.tv_usec = 0;
                retval = select(highest + 1, &readfds, NULL, NULL, &tv);
 
                /* Now figure out who made this select() unblock.