$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,
Fri Jul 10 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
* Initial CVS import
+
/*
* 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;
}
*/
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;
}
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, ...);