[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r36007 - gnunet/src/rps
From: |
gnunet |
Subject: |
[GNUnet-SVN] r36007 - gnunet/src/rps |
Date: |
Fri, 26 Jun 2015 18:57:21 +0200 |
Author: ch3
Date: 2015-06-26 18:57:21 +0200 (Fri, 26 Jun 2015)
New Revision: 36007
Modified:
gnunet/src/rps/gnunet-service-rps.c
Log:
-fix coverity 0003864
Modified: gnunet/src/rps/gnunet-service-rps.c
===================================================================
--- gnunet/src/rps/gnunet-service-rps.c 2015-06-26 16:57:18 UTC (rev 36006)
+++ gnunet/src/rps/gnunet-service-rps.c 2015-06-26 16:57:21 UTC (rev 36007)
@@ -1976,6 +1976,7 @@
uint32_t i;
struct GNUNET_TIME_Relative time_next_round;
struct AttackedPeer *tmp_att_peer;
+ struct PeerContext *peer_ctx;
LOG (GNUNET_ERROR_TYPE_DEBUG, "Going to execute next round maliciously type
%" PRIu32 ".\n",
mal_type);
@@ -2031,6 +2032,20 @@
if (3 == mal_type)
{ /* Combined attack */
+ /* Send PUSH to attacked peers */
+ peer_ctx = get_peer_ctx (peer_map, &attacked_peer);
+ if (GNUNET_YES == get_peer_flag (peer_ctx, VALID)
+ || NULL != peer_ctx->send_channel
+ || NULL != peer_ctx->recv_channel)
+ {
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Goding to send push to attacked peer (%s)\n",
+ GNUNET_i2s (&attacked_peer));
+ send_push (&attacked_peer);
+ }
+ else
+ check_peer_live (peer_ctx);
+
/* The maximum of pushes we're going to send this round */
num_pushes = GNUNET_MIN (GNUNET_MIN (push_limit - 1,
num_attacked_peers),
@@ -2040,9 +2055,6 @@
"Going to send %" PRIu32 " pushes\n",
num_pushes);
- /* Send PUSHes to attacked peers */
- send_push (&attacked_peer);
-
for (i = 0 ; i < num_pushes ; i++)
{
if (att_peers_tail == att_peer_index)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r36007 - gnunet/src/rps,
gnunet <=