From: Christian Grothoff Date: Sat, 16 Nov 2013 18:30:45 +0000 (+0000) Subject: -clean up during shutdown X-Git-Tag: initial-import-from-subversion-38251~6050 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=16d4890cc9745833cd1542d5ec4391b7e4f87c71;p=oweals%2Fgnunet.git -clean up during shutdown --- diff --git a/src/conversation/gnunet-service-conversation.c b/src/conversation/gnunet-service-conversation.c index 08c93eb59..b12d0e193 100644 --- a/src/conversation/gnunet-service-conversation.c +++ b/src/conversation/gnunet-service-conversation.c @@ -1408,6 +1408,19 @@ static void do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) { + struct Line *line; + struct Channel *ch; + + while (NULL != (line = lines_head)) + { + while (NULL != (ch = line->channel_head)) + destroy_line_mesh_channels (ch); + GNUNET_CONTAINER_DLL_remove (lines_head, + lines_tail, + line); + GNUNET_SERVER_client_set_user_context (line->client, (void *) NULL); + GNUNET_free (line); + } if (NULL != mesh) { GNUNET_MESH_disconnect (mesh);