diff options
author | TheJackiMonster <thejackimonster@gmail.com> | 2023-11-23 22:36:22 +0100 |
---|---|---|
committer | TheJackiMonster <thejackimonster@gmail.com> | 2023-11-23 22:36:22 +0100 |
commit | 111fb8077ac12acee330b204100948c12c3fa8dd (patch) | |
tree | 378f93b11c3e1665b01102f02e23a9c3d33c067e | |
parent | 578391d1acb501fb81248f339d2c1a9672684517 (diff) | |
download | libgnunetchat-111fb8077ac12acee330b204100948c12c3fa8dd.tar.gz libgnunetchat-111fb8077ac12acee330b204100948c12c3fa8dd.zip |
Define default block configuration as constants
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
-rw-r--r-- | src/gnunet_chat_lib.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/gnunet_chat_lib.c b/src/gnunet_chat_lib.c index 439a5d3..d9c50a3 100644 --- a/src/gnunet_chat_lib.c +++ b/src/gnunet_chat_lib.c | |||
@@ -49,6 +49,10 @@ | |||
49 | );\ | 49 | );\ |
50 | } | 50 | } |
51 | 51 | ||
52 | static const uint32_t block_anonymity_level = 1; | ||
53 | static const uint32_t block_content_priority = 100; | ||
54 | static const uint32_t block_replication_level = 1; | ||
55 | |||
52 | struct GNUNET_CHAT_Handle* | 56 | struct GNUNET_CHAT_Handle* |
53 | GNUNET_CHAT_start (const struct GNUNET_CONFIGURATION_Handle *cfg, | 57 | GNUNET_CHAT_start (const struct GNUNET_CONFIGURATION_Handle *cfg, |
54 | GNUNET_CHAT_ContextMessageCallback msg_cb, void *msg_cls) | 58 | GNUNET_CHAT_ContextMessageCallback msg_cb, void *msg_cls) |
@@ -1207,9 +1211,9 @@ GNUNET_CHAT_context_send_file (struct GNUNET_CHAT_Context *context, | |||
1207 | 1211 | ||
1208 | struct GNUNET_FS_BlockOptions bo; | 1212 | struct GNUNET_FS_BlockOptions bo; |
1209 | 1213 | ||
1210 | bo.anonymity_level = 1; | 1214 | bo.anonymity_level = block_anonymity_level; |
1211 | bo.content_priority = 100; | 1215 | bo.content_priority = block_content_priority; |
1212 | bo.replication_level = 1; | 1216 | bo.replication_level = block_replication_level; |
1213 | 1217 | ||
1214 | bo.expiration_time = GNUNET_TIME_absolute_add( | 1218 | bo.expiration_time = GNUNET_TIME_absolute_add( |
1215 | GNUNET_TIME_absolute_get(), GNUNET_TIME_relative_get_hour_() | 1219 | GNUNET_TIME_absolute_get(), GNUNET_TIME_relative_get_hour_() |