aboutsummaryrefslogtreecommitdiff
path: root/src/rps
diff options
context:
space:
mode:
authorJulius Bünger <buenger@mytum.de>2016-09-14 22:24:29 +0000
committerJulius Bünger <buenger@mytum.de>2016-09-14 22:24:29 +0000
commit06201645b1b73cf3143d20a9d2f86a5eac034760 (patch)
tree1ccaac4011d75ef4207fbd2a1e99b5f6b222d628 /src/rps
parent79043f911573b636f9bb8350437497a0407d8f41 (diff)
downloadgnunet-06201645b1b73cf3143d20a9d2f86a5eac034760.tar.gz
gnunet-06201645b1b73cf3143d20a9d2f86a5eac034760.zip
-rps service: correcting scope for variable
Diffstat (limited to 'src/rps')
-rw-r--r--src/rps/gnunet-service-rps.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/rps/gnunet-service-rps.c b/src/rps/gnunet-service-rps.c
index 1bd5f08ec..50db66085 100644
--- a/src/rps/gnunet-service-rps.c
+++ b/src/rps/gnunet-service-rps.c
@@ -1237,14 +1237,14 @@ handle_peer_push (void *cls,
1237 "Received PUSH (%s)\n", 1237 "Received PUSH (%s)\n",
1238 GNUNET_i2s (peer)); 1238 GNUNET_i2s (peer));
1239 1239
1240#ifdef ENABLE_MALICIOUS 1240 #ifdef ENABLE_MALICIOUS
1241 struct AttackedPeer *tmp_att_peer; 1241 struct AttackedPeer *tmp_att_peer;
1242 1242
1243 tmp_att_peer = GNUNET_new (struct AttackedPeer); 1243 if ( (1 == mal_type) ||
1244 GNUNET_memcpy (&tmp_att_peer->peer_id, peer, sizeof (struct GNUNET_PeerIdentity)); 1244 (3 == mal_type) )
1245 if (1 == mal_type
1246 || 3 == mal_type)
1247 { /* Try to maximise representation */ 1245 { /* Try to maximise representation */
1246 tmp_att_peer = GNUNET_new (struct AttackedPeer);
1247 GNUNET_memcpy (&tmp_att_peer->peer_id, peer, sizeof (struct GNUNET_PeerIdentity));
1248 if (NULL == att_peer_set) 1248 if (NULL == att_peer_set)
1249 att_peer_set = GNUNET_CONTAINER_multipeermap_create (1, GNUNET_NO); 1249 att_peer_set = GNUNET_CONTAINER_multipeermap_create (1, GNUNET_NO);
1250 if (GNUNET_NO == GNUNET_CONTAINER_multipeermap_contains (att_peer_set, 1250 if (GNUNET_NO == GNUNET_CONTAINER_multipeermap_contains (att_peer_set,
@@ -1265,11 +1265,6 @@ handle_peer_push (void *cls,
1265 GNUNET_CADET_receive_done (channel); 1265 GNUNET_CADET_receive_done (channel);
1266 return GNUNET_OK; 1266 return GNUNET_OK;
1267 } 1267 }
1268 else
1269 {
1270 GNUNET_free (tmp_att_peer);
1271 }
1272
1273 #endif /* ENABLE_MALICIOUS */ 1268 #endif /* ENABLE_MALICIOUS */
1274 1269
1275 /* Add the sending peer to the push_map */ 1270 /* Add the sending peer to the push_map */