commit 111fb8077ac12acee330b204100948c12c3fa8dd
parent 578391d1acb501fb81248f339d2c1a9672684517
Author: TheJackiMonster <thejackimonster@gmail.com>
Date: Thu, 23 Nov 2023 22:36:22 +0100
Define default block configuration as constants
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
Diffstat:
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/gnunet_chat_lib.c b/src/gnunet_chat_lib.c
@@ -49,6 +49,10 @@
);\
}
+static const uint32_t block_anonymity_level = 1;
+static const uint32_t block_content_priority = 100;
+static const uint32_t block_replication_level = 1;
+
struct GNUNET_CHAT_Handle*
GNUNET_CHAT_start (const struct GNUNET_CONFIGURATION_Handle *cfg,
GNUNET_CHAT_ContextMessageCallback msg_cb, void *msg_cls)
@@ -1207,9 +1211,9 @@ GNUNET_CHAT_context_send_file (struct GNUNET_CHAT_Context *context,
struct GNUNET_FS_BlockOptions bo;
- bo.anonymity_level = 1;
- bo.content_priority = 100;
- bo.replication_level = 1;
+ bo.anonymity_level = block_anonymity_level;
+ bo.content_priority = block_content_priority;
+ bo.replication_level = block_replication_level;
bo.expiration_time = GNUNET_TIME_absolute_add(
GNUNET_TIME_absolute_get(), GNUNET_TIME_relative_get_hour_()