* Removed some vestiges
authorArt Cancro <ajc@citadel.org>
Sun, 3 Oct 2004 04:25:23 +0000 (04:25 +0000)
committerArt Cancro <ajc@citadel.org>
Sun, 3 Oct 2004 04:25:23 +0000 (04:25 +0000)
citadel/ChangeLog
citadel/database_sleepycat.c
citadel/server.h
citadel/server_main.c
citadel/sysdep.c
citadel/sysdep_decls.h

index f044746414ed3238f7d45507345f1af8267868d2..87dacf52d9f3628131691c61da04c82cb7f46e97 100644 (file)
@@ -1,4 +1,7 @@
  $Log$
+ Revision 626.4  2004/10/03 04:25:23  ajc
+ * Removed some vestiges
+
  Revision 626.3  2004/10/03 04:11:48  ajc
  * sysdep.c: in the main server loop, when time_to_die is detected, return
    immediately instead of falling through to the end of the function.
@@ -6132,3 +6135,4 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant <bryant@cs.usm.maine.edu>
 
 Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
        * Initial CVS import
+
index 54a8504d7b32fa9d6c92d040677875be12cb8dfb..18c1f10fc98a8dafa0c137538c9c9f958568c337 100644 (file)
@@ -273,9 +273,9 @@ static void cdb_checkpoint(void) {
 
 /*
  * Open the various databases we'll be using.  Any database which
- * does not exist should be created.  Note that we don't need an S_DATABASE
- * critical section here, because there aren't any active threads manipulating
- * the database yet -- and besides, it causes problems on BSDI.
+ * does not exist should be created.  Note that we don't need a
+ * critical section here, because there aren't any active threads
+ * manipulating the database yet.
  */
 void open_databases(void)
 {
index 1e9ea667ff8ed263bf325953124e73436a6ee217..2dbfd1882de1ad7834adafe7f78a6c8f95499ab9 100644 (file)
@@ -211,7 +211,6 @@ enum {
        S_FLOORTAB,
        S_CHATQUEUE,
        S_CONTROL,
-       S_DATABASE,
        S_NETDB,
        S_SUPPMSGMAIN,
        S_CONFIG,
index 3e51f93eac09b7a24d09d2c6d067e7d7d0616b5c..6020ebf541acd82c0956775ca4a2b177c1a56f0e 100644 (file)
@@ -230,7 +230,6 @@ int main(int argc, char **argv)
        end_critical_section(S_WORKER_LIST);
 
        /* Now this thread can become a worker as well. */
-       initial_thread = pthread_self();
        worker_thread(NULL);
 
        /* Server is exiting. Wait for workers to shutdown. */
@@ -243,8 +242,9 @@ int main(int argc, char **argv)
 
                /* avoid deadlock with an exiting thread */
                end_critical_section(S_WORKER_LIST);
-               if ((i = pthread_join(wnp->tid, NULL)))
+               if ((i = pthread_join(wnp->tid, NULL))) {
                        lprintf(CTDL_CRIT, "pthread_join: %s\n", strerror(i));
+               }
                free(wnp);
                begin_critical_section(S_WORKER_LIST);
        }
index 59d3490455124d432a5ad983a581ddba899e57f9..c123520af46fd7fdf5fde852935cc7bb5ac39957 100644 (file)
@@ -95,8 +95,6 @@ time_t last_purge = 0;                                /* Last dead session purge */
 static int num_threads = 0;                    /* Current number of threads */
 int num_sessions = 0;                          /* Current number of sessions */
 
-pthread_t initial_thread;              /* tid for main() thread */
-
 int syslog_facility = (-1);
 
 
@@ -958,9 +956,8 @@ do_select:  force_purge = 0;
                        tv.tv_usec = 0;
                        retval = select(highest + 1, &readfds, NULL, NULL, &tv);
                }
-               else {
-                       return;
-               }
+
+               if (time_to_die) return(NULL);
 
                /* Now figure out who made this select() unblock.
                 * First, check for an error or exit condition.
@@ -1028,10 +1025,6 @@ do_select:       force_purge = 0;
                        }
                }
 
-               if (time_to_die) {
-                       return;
-               }
-
                /* It must be a client socket.  Find a context that has data
                 * waiting on its socket *and* is in the CON_IDLE state.  Any
                 * active sockets other than our chosen one are marked as
@@ -1084,7 +1077,7 @@ SKIP_SELECT:
        }
 
        /* If control reaches this point, the server is shutting down */        
-       return NULL;
+       return(NULL);
 }
 
 
index e0be5f47234f47f239b260583a133acc8566b462..fa486391cd0546f0b181da3312c05b83483ec48b 100644 (file)
@@ -73,7 +73,6 @@ extern int num_sessions;
 extern volatile int time_to_die;
 extern int verbosity;
 extern int rescan[];
-extern pthread_t initial_thread;
 
 extern struct worker_node {
         pthread_t tid;