[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r37926 - gnunet/src/rps
From: |
gnunet |
Subject: |
[GNUnet-SVN] r37926 - gnunet/src/rps |
Date: |
Thu, 15 Sep 2016 00:24:29 +0200 |
Author: ch3
Date: 2016-09-15 00:24:29 +0200 (Thu, 15 Sep 2016)
New Revision: 37926
Modified:
gnunet/src/rps/gnunet-service-rps.c
Log:
-rps service: correcting scope for variable
Modified: gnunet/src/rps/gnunet-service-rps.c
===================================================================
--- gnunet/src/rps/gnunet-service-rps.c 2016-09-14 21:57:07 UTC (rev 37925)
+++ gnunet/src/rps/gnunet-service-rps.c 2016-09-14 22:24:29 UTC (rev 37926)
@@ -1237,14 +1237,14 @@
"Received PUSH (%s)\n",
GNUNET_i2s (peer));
-#ifdef ENABLE_MALICIOUS
+ #ifdef ENABLE_MALICIOUS
struct AttackedPeer *tmp_att_peer;
- tmp_att_peer = GNUNET_new (struct AttackedPeer);
- GNUNET_memcpy (&tmp_att_peer->peer_id, peer, sizeof (struct
GNUNET_PeerIdentity));
- if (1 == mal_type
- || 3 == mal_type)
+ if ( (1 == mal_type) ||
+ (3 == mal_type) )
{ /* Try to maximise representation */
+ tmp_att_peer = GNUNET_new (struct AttackedPeer);
+ GNUNET_memcpy (&tmp_att_peer->peer_id, peer, sizeof (struct
GNUNET_PeerIdentity));
if (NULL == att_peer_set)
att_peer_set = GNUNET_CONTAINER_multipeermap_create (1, GNUNET_NO);
if (GNUNET_NO == GNUNET_CONTAINER_multipeermap_contains (att_peer_set,
@@ -1265,11 +1265,6 @@
GNUNET_CADET_receive_done (channel);
return GNUNET_OK;
}
- else
- {
- GNUNET_free (tmp_att_peer);
- }
-
#endif /* ENABLE_MALICIOUS */
/* Add the sending peer to the push_map */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r37926 - gnunet/src/rps,
gnunet <=