[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet] 04/09: Resuming communicators in case of core restarting.
From: |
gnunet |
Subject: |
[gnunet] 04/09: Resuming communicators in case of core restarting. |
Date: |
Wed, 10 Jan 2024 12:00:01 +0100 |
This is an automated email from the git hooks/post-receive script.
t3sserakt pushed a commit to branch master
in repository gnunet.
commit 84b76e31d77e88c36b40d334c9990c7029b00d35
Author: t3sserakt <t3ss@posteo.de>
AuthorDate: Wed Jan 10 11:33:40 2024 +0100
Resuming communicators in case of core restarting.
---
src/service/transport/gnunet-service-transport.c | 31 ++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/src/service/transport/gnunet-service-transport.c
b/src/service/transport/gnunet-service-transport.c
index 1522a5f21..ab64ddf32 100644
--- a/src/service/transport/gnunet-service-transport.c
+++ b/src/service/transport/gnunet-service-transport.c
@@ -4101,6 +4101,34 @@ notify_client_connect_info (void *cls,
}
+/**
+ * Send ACK to communicator (if requested) and free @a cmc.
+ *
+ * @param cmc context for which we are done handling the message
+ */
+static void
+finish_cmc_handling_with_continue (struct CommunicatorMessageContext *cmc,
+ unsigned
+ int continue_client);
+
+static enum GNUNET_GenericReturnValue
+resume_communicators(void *cls,
+ const struct GNUNET_PeerIdentity *pid,
+ void *value)
+{
+ struct VirtualLink *vl = value;
+ struct CommunicatorMessageContext *cmc;
+
+ /* resume communicators */
+ while (NULL != (cmc = vl->cmc_tail))
+ {
+ GNUNET_CONTAINER_DLL_remove (vl->cmc_head, vl->cmc_tail, cmc);
+ finish_cmc_handling_with_continue (cmc, GNUNET_YES == cmc->continue_send ?
GNUNET_NO : GNUNET_YES);
+ }
+ return GNUNET_OK;
+}
+
+
/**
* Initialize a "CORE" client. We got a start message from this
* client, so add it to the list of clients for broadcasting of
@@ -4137,6 +4165,9 @@ handle_client_start (void *cls, const struct StartMessage
*start)
GNUNET_CONTAINER_multipeermap_iterate (neighbours,
¬ify_client_connect_info,
tc);
+ GNUNET_CONTAINER_multipeermap_iterate (links,
+ &resume_communicators,
+ NULL);
GNUNET_SERVICE_client_continue (tc->client);
}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [gnunet] branch master updated (577ad2f7d -> 29213833f), gnunet, 2024/01/10
- [gnunet] 04/09: Resuming communicators in case of core restarting.,
gnunet <=
- [gnunet] 01/09: Changed creation of key for kx to be for every notification of transport about a new connected peer., gnunet, 2024/01/10
- [gnunet] 02/09: Added missing GNUNET_TRANSPORT_core_receive_continue., gnunet, 2024/01/10
- [gnunet] 03/09: Fixed bug in logic getting root parent of fragment which is a DV box., gnunet, 2024/01/10
- [gnunet] 06/09: Fixed bug calculating next resend of fragments., gnunet, 2024/01/10
- [gnunet] 07/09: first_challenge_use has to be reset in case of revalidation., gnunet, 2024/01/10
- [gnunet] 08/09: When to resend a validation challenge and when to start revalidation needs to be seperate logic., gnunet, 2024/01/10
- [gnunet] 09/09: Merge branch 'master' of ssh://git.gnunet.org/gnunet, gnunet, 2024/01/10
- [gnunet] 05/09: Fixed bug in logic freeing timedout QueueEntry., gnunet, 2024/01/10