[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r34616 - gnunet/src/cadet
From: |
gnunet |
Subject: |
[GNUnet-SVN] r34616 - gnunet/src/cadet |
Date: |
Mon, 15 Dec 2014 08:18:27 +0100 |
Author: bartpolot
Date: 2014-12-15 08:18:27 +0100 (Mon, 15 Dec 2014)
New Revision: 34616
Modified:
gnunet/src/cadet/gnunet-service-cadet_peer.c
Log:
- always allow an ACK
Modified: gnunet/src/cadet/gnunet-service-cadet_peer.c
===================================================================
--- gnunet/src/cadet/gnunet-service-cadet_peer.c 2014-12-15 07:18:26 UTC
(rev 34615)
+++ gnunet/src/cadet/gnunet-service-cadet_peer.c 2014-12-15 07:18:27 UTC
(rev 34616)
@@ -961,6 +961,20 @@
/**
+ * Adjust core requested size to accomodate an ACK.
+ *
+ * @param message_size Requested size.
+ *
+ * @return Size enough to fit @c message_size and an ACK.
+ */
+static size_t
+get_core_size (size_t message_size)
+{
+ return message_size + sizeof (struct GNUNET_CADET_ACK);
+}
+
+
+/**
* Fill a core buffer with the appropriate data for the queued message.
*
* @param queue Queue element for the message.
@@ -1136,7 +1150,7 @@
GNUNET_NO, get_priority (queue),
GNUNET_TIME_UNIT_FOREVER_REL,
dst_id,
- queue->size,
+ get_core_size (queue->size),
&queue_send,
peer);
peer->tmt_time = GNUNET_TIME_absolute_get ();
@@ -1342,7 +1356,8 @@
GNUNET_NO, get_priority (q),
GNUNET_TIME_UNIT_FOREVER_REL,
GNUNET_PEER_resolve2 (peer->id),
- size, &queue_send, peer);
+ get_core_size (size),
+ &queue_send, peer);
peer->tmt_time = GNUNET_TIME_absolute_get ();
}
else if (GNUNET_NO == call_core)
@@ -1553,7 +1568,7 @@
GNUNET_NO, get_priority (q),
GNUNET_TIME_UNIT_FOREVER_REL,
GNUNET_PEER_resolve2 (peer->id),
- size,
+ get_core_size (size),
&queue_send,
peer);
peer->tmt_time = GNUNET_TIME_absolute_get ();
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r34616 - gnunet/src/cadet,
gnunet <=