]> code.citadel.org Git - citadel.git/blobdiff - webcit/context_loop.c
* Removed some pseudocode
[citadel.git] / webcit / context_loop.c
index 1a18ef31f13c3b99d7116ba552f169ea6068c87b..fce94fb86c928463a84e5408474e5b98f2943f03 100644 (file)
@@ -70,10 +70,10 @@ void do_housekeeping(void)
 BREAKOUT:      pthread_mutex_unlock(&SessionListMutex);
 
                if (session_to_kill != NULL) {
-                       lock the session
-                       shut down the session
-                       unlock the session
-                       free the struct
+                       pthread_mutex_lock(&session_to_kill->SessionMutex);
+                       close(session_to_kill->serv_sock);
+                       pthread_mutex_unlock(&session_to_kill->SessionMutex);
+                       free(session_to_kill);
                }
 
        } while (session_to_kill != NULL);