[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r21400 - gnunet/src/util
From: |
gnunet |
Subject: |
[GNUnet-SVN] r21400 - gnunet/src/util |
Date: |
Wed, 9 May 2012 23:56:52 +0200 |
Author: grothoff
Date: 2012-05-09 23:56:52 +0200 (Wed, 09 May 2012)
New Revision: 21400
Modified:
gnunet/src/util/server.c
Log:
-fixing #2335 some more...
Modified: gnunet/src/util/server.c
===================================================================
--- gnunet/src/util/server.c 2012-05-09 21:40:38 UTC (rev 21399)
+++ gnunet/src/util/server.c 2012-05-09 21:56:52 UTC (rev 21400)
@@ -286,8 +286,7 @@
int in_process_client_buffer;
/**
- * We're about to close down this client due to some serious
- * error.
+ * We're about to close down this client.
*/
int shutdown_now;
@@ -1136,6 +1135,7 @@
else
client->mst =
GNUNET_SERVER_mst_create (&client_message_tokenizer_callback, server);
+ GNUNET_assert (NULL != client->mst);
client->receive_pending = GNUNET_YES;
GNUNET_CONNECTION_receive (client->connection,
GNUNET_SERVER_MAX_MESSAGE_SIZE - 1,
@@ -1313,12 +1313,11 @@
GNUNET_CONNECTION_receive_cancel (client->connection);
client->receive_pending = GNUNET_NO;
}
-
+ client->shutdown_now = GNUNET_YES;
client->reference_count++; /* make sure nobody else clean up client... */
- if ( (GNUNET_YES != client->shutdown_now) &&
+ if ( (NULL != client->mst) &&
(NULL != server) )
{
- client->shutdown_now = GNUNET_YES;
GNUNET_CONTAINER_DLL_remove (server->clients_head,
server->clients_tail,
client);
@@ -1332,13 +1331,13 @@
GNUNET_SCHEDULER_cancel (client->warn_task);
client->warn_task = GNUNET_SCHEDULER_NO_TASK;
}
- for (n = server->disconnect_notify_list_head; NULL != n; n = n->next)
- n->callback (n->callback_cls, client);
if (NULL != server->mst_destroy)
server->mst_destroy (server->mst_cls, client->mst);
else
GNUNET_SERVER_mst_destroy (client->mst);
client->mst = NULL;
+ for (n = server->disconnect_notify_list_head; NULL != n; n = n->next)
+ n->callback (n->callback_cls, client);
}
client->reference_count--;
if (client->reference_count > 0)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r21400 - gnunet/src/util,
gnunet <=