summaryrefslogtreecommitdiff
path: root/src/messenger/gnunet-service-messenger_member_session.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/messenger/gnunet-service-messenger_member_session.c')
-rw-r--r--src/messenger/gnunet-service-messenger_member_session.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/messenger/gnunet-service-messenger_member_session.c b/src/messenger/gnunet-service-messenger_member_session.c
index 846dbbe2b..d71513046 100644
--- a/src/messenger/gnunet-service-messenger_member_session.c
+++ b/src/messenger/gnunet-service-messenger_member_session.c
@@ -1,6 +1,6 @@
/*
This file is part of GNUnet.
- Copyright (C) 2021 GNUnet e.V.
+ Copyright (C) 2021--2022 GNUnet e.V.
GNUnet is free software: you can redistribute it and/or modify it
under the terms of the GNU Affero General Public License as published
@@ -84,6 +84,9 @@ check_member_session_completion (struct GNUNET_MESSENGER_MemberSession *session)
{
GNUNET_assert (session);
+ GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Check session history (%s) for completion.\n",
+ GNUNET_sh2s(get_member_session_id(session)));
+
if (!session->messages.tail)
{
session->completed = GNUNET_YES;
@@ -98,7 +101,7 @@ check_member_session_completion (struct GNUNET_MESSENGER_MemberSession *session)
add_to_list_messages(&level, end);
- struct GNUNET_MESSENGER_MessageStore *store = get_room_message_store(session->member->store->room);
+ struct GNUNET_MESSENGER_MessageStore *store = get_srv_room_message_store(session->member->store->room);
struct GNUNET_MESSENGER_ListMessages list;
init_list_messages(&list);
@@ -142,7 +145,10 @@ check_member_session_completion (struct GNUNET_MESSENGER_MemberSession *session)
completion:
if (GNUNET_YES == is_member_session_completed(session))
{
- GNUNET_CONTAINER_multihashmap_destroy (session->history);
+ GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Completed session history (%s)\n",
+ GNUNET_sh2s(get_member_session_id(session)));
+
+ GNUNET_CONTAINER_multihashmap_clear (session->history);
struct GNUNET_MESSENGER_ContactStore *store = get_member_contact_store(session->member->store);