[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r13349 - gnunet/src/fs
From: |
gnunet |
Subject: |
[GNUnet-SVN] r13349 - gnunet/src/fs |
Date: |
Thu, 21 Oct 2010 15:22:46 +0200 |
Author: grothoff
Date: 2010-10-21 15:22:46 +0200 (Thu, 21 Oct 2010)
New Revision: 13349
Modified:
gnunet/src/fs/gnunet-service-fs.c
Log:
minus
Modified: gnunet/src/fs/gnunet-service-fs.c
===================================================================
--- gnunet/src/fs/gnunet-service-fs.c 2010-10-21 13:22:24 UTC (rev 13348)
+++ gnunet/src/fs/gnunet-service-fs.c 2010-10-21 13:22:46 UTC (rev 13349)
@@ -1581,7 +1581,14 @@
struct MigrationReadyBlock *pos;
char *fn;
uint32_t trust;
-
+
+ cp = GNUNET_CONTAINER_multihashmap_get (connected_peers,
+ &peer->hashPubKey);
+ if (NULL != cp)
+ {
+ GNUNET_break (0);
+ return;
+ }
cp = GNUNET_malloc (sizeof (struct ConnectedPeer));
cp->transmission_delay = GNUNET_LOAD_value_init (latency);
cp->pid = GNUNET_PEER_intern (peer);
@@ -4018,7 +4025,13 @@
return GNUNET_SYSERR;
}
opt = (const GNUNET_HashCode*) &gm[1];
- bfsize = msize - sizeof (struct GetMessage) + bits * sizeof
(GNUNET_HashCode);
+ bfsize = msize - sizeof (struct GetMessage) - bits * sizeof
(GNUNET_HashCode);
+ /* bfsize must be power of 2, check! */
+ if (0 != ( (bfsize - 1) & bfsize))
+ {
+ GNUNET_break_op (0);
+ return GNUNET_SYSERR;
+ }
bm = ntohl (gm->hash_bitmap);
bits = 0;
cps = GNUNET_CONTAINER_multihashmap_get (connected_peers,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r13349 - gnunet/src/fs,
gnunet <=