[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] branch master updated (31a1df068 -> 4aef73f70)
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] branch master updated (31a1df068 -> 4aef73f70) |
Date: |
Thu, 24 Jan 2019 19:51:45 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a change to branch master
in repository gnunet.
from 31a1df068 REST: fix oidc redirecto uri 0-terminator
new 817720bfd fix #5491
new 4aef73f70 more work on tng (incomplete)
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
src/cadet/gnunet-service-cadet.c | 16 ++++++++--------
src/transport/gnunet-service-tng.c | 21 ++++++++++++++++++++-
2 files changed, 28 insertions(+), 9 deletions(-)
diff --git a/src/cadet/gnunet-service-cadet.c b/src/cadet/gnunet-service-cadet.c
index 4f9fda82b..ae5d48943 100644
--- a/src/cadet/gnunet-service-cadet.c
+++ b/src/cadet/gnunet-service-cadet.c
@@ -380,6 +380,14 @@ shutdown_rest ()
GNUNET_NO);
stats = NULL;
}
+ /* Destroy tunnels. Note that all channels must be destroyed first! */
+ GCP_iterate_all (&destroy_tunnels_now,
+ NULL);
+ /* All tunnels, channels, connections and CORE must be down before this
point. */
+ GCP_iterate_all (&destroy_paths_now,
+ NULL);
+ /* All paths, tunnels, channels, connections and CORE must be down before
this point. */
+ GCP_destroy_all_peers ();
if (NULL != open_ports)
{
GNUNET_CONTAINER_multihashmap_destroy (open_ports);
@@ -390,14 +398,6 @@ shutdown_rest ()
GNUNET_CONTAINER_multihashmap_destroy (loose_channels);
loose_channels = NULL;
}
- /* Destroy tunnels. Note that all channels must be destroyed first! */
- GCP_iterate_all (&destroy_tunnels_now,
- NULL);
- /* All tunnels, channels, connections and CORE must be down before this
point. */
- GCP_iterate_all (&destroy_paths_now,
- NULL);
- /* All paths, tunnels, channels, connections and CORE must be down before
this point. */
- GCP_destroy_all_peers ();
if (NULL != peers)
{
GNUNET_CONTAINER_multipeermap_destroy (peers);
diff --git a/src/transport/gnunet-service-tng.c
b/src/transport/gnunet-service-tng.c
index 76d5265a8..6c3373013 100644
--- a/src/transport/gnunet-service-tng.c
+++ b/src/transport/gnunet-service-tng.c
@@ -843,6 +843,11 @@ struct PendingMessage
*/
struct GNUNET_ShortHashCode msg_uuid;
+ /**
+ * Message ID used for this message with the queue used for transmission.
+ */
+ uint64_t mid;
+
/**
* Counter incremented per generated fragment.
*/
@@ -2315,6 +2320,8 @@ transmit_on_queue (void *cls)
struct PendingMessage *pm;
struct PendingMessage *s;
uint32_t overhead;
+ struct GNUNET_TRANSPORT_SendMessageTo *smt;
+ struct GNUNET_MQ_Envelope *env;
queue->transmit_task = NULL;
if (NULL == (pm = n->pending_msg_head))
@@ -2331,12 +2338,13 @@ transmit_on_queue (void *cls)
s = pm;
if ( ( (0 != queue->mtu) &&
(pm->bytes_msg + overhead > queue->mtu) ) ||
+ (pm->bytes_msg > UINT16_MAX - sizeof (struct
GNUNET_TRANSPORT_SendMessageTo)) ||
(NULL != pm->head_frag /* fragments already exist, should
respect that even if MTU is 0 for
this queue */) )
s = fragment_message (s,
(0 == queue->mtu)
- ? UINT16_MAX /* no real maximum */
+ ? UINT16_MAX - sizeof (struct
GNUNET_TRANSPORT_SendMessageTo)
: queue->mtu);
if (NULL == s)
{
@@ -2352,6 +2360,17 @@ transmit_on_queue (void *cls)
schedule_transmit_on_queue (queue);
return;
}
+
+ // pm->mid = queue->mid_gen++;
+ env = GNUNET_MQ_msg_extra (smt,
+ s->bytes_msg,
+ GNUNET_MESSAGE_TYPE_TRANSPORT_SEND_MSG);
+ smt->qid = queue->qid;
+ // smt->mid = pm->mid;
+ // smt->receiver = pid;
+ memcpy (&smt[1],
+ &s[1],
+ s->bytes_msg);
// FIXME: actually give 's' to communicator for transmission here!
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnunet] branch master updated (31a1df068 -> 4aef73f70),
gnunet <=