[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r34866 - gnunet/src/cadet
From: |
gnunet |
Subject: |
[GNUnet-SVN] r34866 - gnunet/src/cadet |
Date: |
Fri, 9 Jan 2015 19:04:35 +0100 |
Author: bartpolot
Date: 2015-01-09 19:04:35 +0100 (Fri, 09 Jan 2015)
New Revision: 34866
Modified:
gnunet/src/cadet/gnunet-service-cadet_connection.c
Log:
- test connection_create size, add size to log
Modified: gnunet/src/cadet/gnunet-service-cadet_connection.c
===================================================================
--- gnunet/src/cadet/gnunet-service-cadet_connection.c 2015-01-09 18:04:33 UTC
(rev 34865)
+++ gnunet/src/cadet/gnunet-service-cadet_connection.c 2015-01-09 18:04:35 UTC
(rev 34866)
@@ -1635,11 +1635,14 @@
const struct GNUNET_PeerIdentity *peer,
const struct GNUNET_CADET_Hash *hash)
{
+ uint16_t size;
+
+ size = ntohs (message->size);
LOG (GNUNET_ERROR_TYPE_INFO, "\n");
LOG (GNUNET_ERROR_TYPE_INFO, "\n");
- LOG (GNUNET_ERROR_TYPE_INFO, "<-- %s on connection %s from %s\n",
+ LOG (GNUNET_ERROR_TYPE_INFO, "<-- %s on connection %s from %s, %6u bytes\n",
GC_m2s (ntohs (message->type)), GNUNET_h2s (GC_h2hc (hash)),
- GNUNET_i2s (peer));
+ GNUNET_i2s (peer), (unsigned int) size);
}
/******************************************************************************/
@@ -1685,6 +1688,11 @@
GNUNET_break_op (0);
return GNUNET_OK;
}
+ if (0 != size % sizeof (struct GNUNET_PeerIdentity))
+ {
+ GNUNET_break_op (0);
+ return GNUNET_OK;
+ }
size /= sizeof (struct GNUNET_PeerIdentity);
if (1 > size)
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r34866 - gnunet/src/cadet,
gnunet <=