[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] 02/02: more work on tng (incomplete)
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] 02/02: more work on tng (incomplete) |
Date: |
Thu, 24 Jan 2019 19:51:47 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository gnunet.
commit 4aef73f70ec3bd117236b81b777022dc8cca966c
Author: Christian Grothoff <address@hidden>
AuthorDate: Thu Jan 24 19:51:29 2019 +0100
more work on tng (incomplete)
---
src/transport/gnunet-service-tng.c | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
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