[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet] branch master updated: -fix fs index_start_failed
From: |
gnunet |
Subject: |
[gnunet] branch master updated: -fix fs index_start_failed |
Date: |
Mon, 19 Sep 2022 14:35:39 +0200 |
This is an automated email from the git hooks/post-receive script.
thejackimonster pushed a commit to branch master
in repository gnunet.
The following commit(s) were added to refs/heads/master by this push:
new d9a0342d7 -fix fs index_start_failed
d9a0342d7 is described below
commit d9a0342d77f4489e56678d9a8e6afc9e25d8163d
Author: TheJackiMonster <thejackimonster@gmail.com>
AuthorDate: Mon Sep 19 14:35:32 2022 +0200
-fix fs index_start_failed
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
---
src/fs/fs_publish.c | 2 +-
src/fs/gnunet-service-fs.c | 10 ++++++++--
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/src/fs/fs_publish.c b/src/fs/fs_publish.c
index f891f37a1..5cdf8f6e8 100644
--- a/src/fs/fs_publish.c
+++ b/src/fs/fs_publish.c
@@ -699,7 +699,7 @@ check_index_start_failed (void *cls,
size_t msize = ntohs (msg->size) - sizeof(*msg);
const char *emsg = (const char *) &msg[1];
- if (emsg[msize - sizeof(struct GNUNET_MessageHeader) - 1] != '\0')
+ if (emsg[msize - 1] != '\0')
{
GNUNET_break (0);
return GNUNET_SYSERR;
diff --git a/src/fs/gnunet-service-fs.c b/src/fs/gnunet-service-fs.c
index 05c7e2192..c22a5b5a9 100644
--- a/src/fs/gnunet-service-fs.c
+++ b/src/fs/gnunet-service-fs.c
@@ -1041,8 +1041,14 @@ hash_for_index_val (void *cls,
"Hash mismatch trying to index file `%s' which does not have
hash `%s'\n"),
isc->filename,
GNUNET_h2s (&isc->file_id));
- env = GNUNET_MQ_msg (msg,
- GNUNET_MESSAGE_TYPE_FS_INDEX_START_FAILED);
+
+ const char *emsg = "hash mismatch";
+ const size_t msize = strlen(emsg) + 1;
+
+ env = GNUNET_MQ_msg_extra (msg,
+ msize,
+ GNUNET_MESSAGE_TYPE_FS_INDEX_START_FAILED);
+ memcpy((char*) &msg[1], emsg, msize);
GNUNET_MQ_send (lc->mq,
env);
GNUNET_SERVICE_client_continue (lc->client);
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnunet] branch master updated: -fix fs index_start_failed,
gnunet <=