From 8d6058c34df98102009ca0a9456da0bcb06d39f2 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 27 Jul 2011 07:40:39 +0000 Subject: fix --- src/fragmentation/fragmentation.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/fragmentation/fragmentation.c') diff --git a/src/fragmentation/fragmentation.c b/src/fragmentation/fragmentation.c index 77b4c2e49..e97b0f763 100644 --- a/src/fragmentation/fragmentation.c +++ b/src/fragmentation/fragmentation.c @@ -18,7 +18,7 @@ Boston, MA 02111-1307, USA. */ /** - * @file src/fragmentation/fragmentation_new.c + * @file src/fragmentation/fragmentation.c * @brief library to help fragment messages * @author Christian Grothoff */ @@ -249,11 +249,11 @@ GNUNET_FRAGMENT_context_create (struct GNUNET_STATISTICS_Handle *stats, _("# messages fragmented"), 1, GNUNET_NO); GNUNET_assert (mtu >= 1024 + sizeof (struct FragmentHeader)); - size = ntohs (msg->size); + size = ntohs (msg->size); GNUNET_STATISTICS_update (stats, _("# total size of fragmented messages"), size, GNUNET_NO); - //GNUNET_assert (size > mtu); + GNUNET_assert (size >= sizeof (struct GNUNET_MessageHeader)); fc = GNUNET_malloc (sizeof (struct GNUNET_FRAGMENT_Context) + size); fc->stats = stats; fc->mtu = mtu; @@ -398,5 +398,5 @@ GNUNET_FRAGMENT_context_destroy (struct GNUNET_FRAGMENT_Context *fc) } -/* end of fragmentation_new.c */ +/* end of fragmentation.c */ -- cgit v1.2.3