commit 6248987bdc93db47fc80737254231359d49e0131
parent a7afb4c0d03a71aeb67e9690f7e79396b542caff
Author: Jacki <jacki@thejackimonster.de>
Date: Fri, 26 Apr 2024 02:36:09 +0200
Stop FS operations on file destruction
Signed-off-by: Jacki <jacki@thejackimonster.de>
Diffstat:
1 file changed, 10 insertions(+), 0 deletions(-)
diff --git a/src/gnunet_chat_file.c b/src/gnunet_chat_file.c
@@ -28,6 +28,7 @@
#include "gnunet_chat_handle.h"
#include <gnunet/gnunet_common.h>
+#include <gnunet/gnunet_fs_service.h>
#include <string.h>
static void
@@ -194,6 +195,15 @@ skip_filename:
GNUNET_free(file->preview);
skip_preview:
+ if (file->publish)
+ GNUNET_FS_publish_stop(file->publish);
+
+ if (file->download)
+ GNUNET_FS_download_stop(file->download, GNUNET_NO);
+
+ if (file->unindex)
+ GNUNET_FS_unindex_stop(file->unindex);
+
while (file->upload_head)
{
upload = file->upload_head;