]> code.citadel.org Git - citadel.git/commitdiff
damn bugs
authorArt Cancro <ajc@citadel.org>
Tue, 26 Oct 1999 13:59:12 +0000 (13:59 +0000)
committerArt Cancro <ajc@citadel.org>
Tue, 26 Oct 1999 13:59:12 +0000 (13:59 +0000)
citadel/ChangeLog
citadel/citserver.c
citadel/sysdep.c
citadel/sysdep_decls.h

index 7b0ce4ea9ac518ab8de13d6fb9a29e9c59982fcb..73abd48cb9260b699c64d6c90062bd2cd38a6aae 100644 (file)
@@ -1,4 +1,7 @@
 $Log$
+Revision 1.396  1999/10/26 13:59:11  ajc
+damn bugs
+
 Revision 1.395  1999/10/26 03:48:39  ajc
 * Shuffled around the order of events when a thread is terminating.  All
   mutex operations now happen prior to the freeing of the CitContext structure,
@@ -1357,3 +1360,4 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant <bryant@cs.usm.maine.edu>
 
 Fri Jul 10 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
        * Initial CVS import 
+
index 8a9f9b9ec9454de08cc30b104e79c8c4cc8a2fe0..738e866950ed626d114a0d9edd27b78c7a334e5d 100644 (file)
@@ -147,7 +147,7 @@ void cleanup_stuff(void *arg)
         * doing the work.
         */
        lprintf(7, "Calling RemoveContext(%d)\n", CC->cs_pid);
-       RemoveContext(CC->cs_pid);
+       RemoveContext(CC);
        }
 
 
index 32fb846e937f85b86a0c769be56b9a3e0cfff117..ea92e4772fffe3f99f353bf6410a86b740779862 100644 (file)
@@ -434,14 +434,14 @@ void InitMyContext(struct CitContext *con)
 /*
  * Remove a context from the context list.
  */
-void RemoveContext(int con)
+void RemoveContext(struct CitContext *con)
 {
        struct CitContext *ptr = NULL;
        struct CitContext *ToFree = NULL;
 
        lprintf(7, "Starting RemoveContext()\n");
-       if (con==0) {
-               lprintf(7, "WARNING: RemoveContext() called with 0!\n");
+       if (con==NULL) {
+               lprintf(5, "WARNING: RemoveContext() called with NULL!\n");
                return;
                }
 
@@ -451,13 +451,13 @@ void RemoveContext(int con)
         */
        begin_critical_section(S_SESSION_TABLE);
 
-       if (ContextList->client_socket == con) {
+       if (ContextList == con) {
                ToFree = ContextList;
                ContextList = ContextList->next;
                }
        else {
                for (ptr = ContextList; ptr != NULL; ptr = ptr->next) {
-                       if (ptr->next->client_socket == con) {
+                       if (ptr->next == con) {
                                ToFree = ptr->next;
                                ptr->next = ptr->next->next;
                                }
index d1777bdc1a29f699074b0da2d76ffd1e93a91861..4f1587f8c2941a6dfb42f99906c8c38668f47ae3 100644 (file)
@@ -7,7 +7,7 @@ int ig_tcp_server (int port_number, int queue_len);
 struct CitContext *MyContext (void);
 struct CitContext *CreateNewContext (void);
 void InitMyContext (struct CitContext *con);
-void RemoveContext (int con);
+void RemoveContext (struct CitContext *con);
 int session_count (void);
 void client_write (char *buf, int nbytes);
 void cprintf (const char *format, ...);