fixed client removal order bug

This commit is contained in:
Jeff Hill
2003-07-02 20:55:31 +00:00
parent 78ad1feec8
commit 47b044d257
2 changed files with 8 additions and 10 deletions

View File

@@ -195,10 +195,6 @@ FAST int sock;
NULL);
}
LOCK_CLIENTQ;
ellAdd(&clientQ, &client->node);
UNLOCK_CLIENTQ;
client->evuser = (struct event_user *) db_init_events();
if (!client->evuser) {
logMsg("CAS: unable to init the event facility\n",
@@ -243,6 +239,10 @@ FAST int sock;
free_client(client);
return ERROR;
}
LOCK_CLIENTQ;
ellAdd(&clientQ, &client->node);
UNLOCK_CLIENTQ;
client->recv.cnt = 0ul;
while (TRUE) {
@@ -355,6 +355,10 @@ FAST int sock;
}
}
LOCK_CLIENTQ;
ellRemove(&clientQ, &client->node);
UNLOCK_CLIENTQ;
free_client(client);
return OK;

View File

@@ -179,12 +179,6 @@ int free_client(struct client *client)
return ERROR;
}
/* remove it from the list of clients */
/* list delete returns no status */
LOCK_CLIENTQ;
ellDelete(&clientQ, &client->node);
UNLOCK_CLIENTQ;
terminate_one_client(client);
freeListFree(rsrvClientFreeList, client);