aboutsummaryrefslogtreecommitdiff
path: root/src/util/peer.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2010-02-19 15:45:16 +0000
committerChristian Grothoff <christian@grothoff.org>2010-02-19 15:45:16 +0000
commitf06ca9dcef0d602baa3a7c6462baff0dd70b2e4a (patch)
tree15c1c396a15e02477da883c2d8670ca74883f754 /src/util/peer.c
parente1fe5a5ca9711cb615e4c85daf002364592814b9 (diff)
downloadgnunet-f06ca9dcef0d602baa3a7c6462baff0dd70b2e4a.tar.gz
gnunet-f06ca9dcef0d602baa3a7c6462baff0dd70b2e4a.zip
debugging
Diffstat (limited to 'src/util/peer.c')
-rw-r--r--src/util/peer.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/util/peer.c b/src/util/peer.c
index 2ad4b3d67..5c00d5580 100644
--- a/src/util/peer.c
+++ b/src/util/peer.c
@@ -31,21 +31,18 @@
31struct PeerEntry 31struct PeerEntry
32{ 32{
33 /** 33 /**
34 * the identifier itself 34 * The identifier itself
35 */ 35 */
36 struct GNUNET_PeerIdentity id; 36 struct GNUNET_PeerIdentity id;
37 37
38 /** 38 /**
39 * Short version of the identifier; 39 * Short version of the identifier; if the RC==0, then index of next
40 * if the RC==0, then index of next 40 * free slot in table, otherwise equal to this slot in the table.
41 * free slot in table, otherwise
42 * equal to this slot in the table.
43 */ 41 */
44 GNUNET_PEER_Id pid; 42 GNUNET_PEER_Id pid;
45 43
46 /** 44 /**
47 * Reference counter, 0 if this slot 45 * Reference counter, 0 if this slot is not used.
48 * is not used.
49 */ 46 */
50 unsigned int rc; 47 unsigned int rc;
51}; 48};
@@ -144,6 +141,8 @@ GNUNET_PEER_decrement_rcs (const GNUNET_PEER_Id * ids, unsigned int count)
144 for (i = count - 1; i >= 0; i--) 141 for (i = count - 1; i >= 0; i--)
145 { 142 {
146 id = ids[i]; 143 id = ids[i];
144 if (id == 0)
145 continue;
147 GNUNET_assert (id < size); 146 GNUNET_assert (id < size);
148 GNUNET_assert (table[id].rc > 0); 147 GNUNET_assert (table[id].rc > 0);
149 table[id].rc--; 148 table[id].rc--;