[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r34863 - gnunet/src/cadet
From: |
gnunet |
Subject: |
[GNUnet-SVN] r34863 - gnunet/src/cadet |
Date: |
Fri, 9 Jan 2015 19:04:31 +0100 |
Author: bartpolot
Date: 2015-01-09 19:04:31 +0100 (Fri, 09 Jan 2015)
New Revision: 34863
Modified:
gnunet/src/cadet/cadet_api.c
Log:
- simpify api size handling code
Modified: gnunet/src/cadet/cadet_api.c
===================================================================
--- gnunet/src/cadet/cadet_api.c 2015-01-09 18:04:30 UTC (rev 34862)
+++ gnunet/src/cadet/cadet_api.c 2015-01-09 18:04:31 UTC (rev 34863)
@@ -373,16 +373,8 @@
for (th = h->th_head; NULL != th; th = th->next)
{
ch = th->channel;
- if (GNUNET_NO == th_is_payload (th))
- {
- LOG (GNUNET_ERROR_TYPE_DEBUG, "# message internal\n");
+ if (GNUNET_NO == th_is_payload (th) || GNUNET_YES == ch->allow_send)
return th->size;
- }
- if (GNUNET_YES == ch->allow_send)
- {
- LOG (GNUNET_ERROR_TYPE_DEBUG, "# message payload ok\n");
- return th->size + DATA_OVERHEAD;
- }
}
return 0;
}
@@ -1320,7 +1312,7 @@
size_t nsize;
LOG (GNUNET_ERROR_TYPE_DEBUG, "\n");
- LOG (GNUNET_ERROR_TYPE_DEBUG, "# Send packet() Buffer %u\n", size);
+ LOG (GNUNET_ERROR_TYPE_DEBUG, "# Send callback, buffer %u\n", size);
if ((0 == size) || (NULL == buf))
{
LOG (GNUNET_ERROR_TYPE_DEBUG, "# Received NULL send callback on %p\n", h);
@@ -1733,7 +1725,7 @@
th = GNUNET_new (struct GNUNET_CADET_TransmitHandle);
th->channel = channel;
th->timeout = GNUNET_TIME_relative_to_absolute (maxdelay);
- th->size = notify_size + sizeof (struct GNUNET_CADET_LocalData);
+ th->size = notify_size + DATA_OVERHEAD;
channel->packet_size = th->size;
LOG (GNUNET_ERROR_TYPE_DEBUG, " total size %u\n", th->size);
th->notify = notify;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r34863 - gnunet/src/cadet,
gnunet <=