commit 2c0dd8a4a717bb779faa65202c3b8001d684c685
parent 1cef77e04ce307e4375501e8f2f078779b8d316b
Author: Jacki <jacki@thejackimonster.de>
Date: Fri, 28 Jun 2024 23:43:25 +0200
Mark context of contact as deleted during destruction
Signed-off-by: Jacki <jacki@thejackimonster.de>
Diffstat:
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/gnunet_chat_lib.c b/src/gnunet_chat_lib.c
@@ -89,8 +89,7 @@ GNUNET_CHAT_stop (struct GNUNET_CHAT_Handle *handle)
if ((!handle) || (handle->destruction))
return;
- handle->destruction = GNUNET_SCHEDULER_add_at_with_priority(
- GNUNET_TIME_absolute_get(),
+ handle->destruction = GNUNET_SCHEDULER_add_with_priority(
GNUNET_SCHEDULER_PRIORITY_URGENT,
task_handle_destruction,
handle
@@ -1074,6 +1073,9 @@ GNUNET_CHAT_contact_delete (struct GNUNET_CHAT_Contact *contact)
if ((!contact) || (contact->destruction))
return;
+ if (contact->context)
+ contact->context->deleted = GNUNET_YES;
+
contact->destruction = GNUNET_SCHEDULER_add_now(
task_contact_destruction,
contact