From 16d4890cc9745833cd1542d5ec4391b7e4f87c71 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 16 Nov 2013 18:30:45 +0000 Subject: [PATCH] -clean up during shutdown --- src/conversation/gnunet-service-conversation.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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); -- 2.25.1