From: Christian Grothoff Date: Wed, 9 May 2012 21:40:38 +0000 (+0000) Subject: -less crack smoking required: finding pos==client in DLL is pretty useless now... X-Git-Tag: initial-import-from-subversion-38251~13560 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=b54f62d2a7882984459ade6d114bb06d0ad5e506;p=oweals%2Fgnunet.git -less crack smoking required: finding pos==client in DLL is pretty useless now... --- diff --git a/src/util/server.c b/src/util/server.c index 602c25ade..fe0e5ca40 100644 --- a/src/util/server.c +++ b/src/util/server.c @@ -1294,7 +1294,6 @@ void GNUNET_SERVER_client_disconnect (struct GNUNET_SERVER_Client *client) { struct GNUNET_SERVER_Handle *server = client->server; - struct GNUNET_SERVER_Client *pos; struct NotifyList *n; LOG (GNUNET_ERROR_TYPE_DEBUG, @@ -1320,13 +1319,9 @@ GNUNET_SERVER_client_disconnect (struct GNUNET_SERVER_Client *client) (NULL != server) ) { client->shutdown_now = GNUNET_YES; - pos = server->clients_head; - while ((NULL != pos) && (pos != client)) - pos = pos->next; - GNUNET_assert (NULL != pos); GNUNET_CONTAINER_DLL_remove (server->clients_head, server->clients_tail, - pos); + client); if (GNUNET_SCHEDULER_NO_TASK != client->restart_task) { GNUNET_SCHEDULER_cancel (client->restart_task);