aboutsummaryrefslogtreecommitdiff
path: root/src/rps
diff options
context:
space:
mode:
authorJulius Bünger <buenger@mytum.de>2015-08-03 12:06:34 +0000
committerJulius Bünger <buenger@mytum.de>2015-08-03 12:06:34 +0000
commit25fcc61c80ead51e496f8e350e051893e052198c (patch)
treeca329818416509f3b52ff65c3e657223beb29afa /src/rps
parente71c17ad3aebd7a8f444a08744288dec1415980c (diff)
downloadgnunet-25fcc61c80ead51e496f8e350e051893e052198c.tar.gz
gnunet-25fcc61c80ead51e496f8e350e051893e052198c.zip
-logging and fix
Diffstat (limited to 'src/rps')
-rw-r--r--src/rps/gnunet-service-rps.c6
-rw-r--r--src/rps/rps_api.c3
2 files changed, 7 insertions, 2 deletions
diff --git a/src/rps/gnunet-service-rps.c b/src/rps/gnunet-service-rps.c
index f4aa9d42b..97f687b7b 100644
--- a/src/rps/gnunet-service-rps.c
+++ b/src/rps/gnunet-service-rps.c
@@ -937,6 +937,9 @@ insert_in_view (void *cls, const struct GNUNET_PeerIdentity *peer)
937{ 937{
938 if (GNUNET_YES == GNUNET_CONTAINER_multipeermap_contains (view, peer)) 938 if (GNUNET_YES == GNUNET_CONTAINER_multipeermap_contains (view, peer))
939 return; 939 return;
940 LOG (GNUNET_ERROR_TYPE_DEBUG,
941 "Going to put %s into view\n",
942 GNUNET_i2s (peer));
940 if (GNUNET_YES != GNUNET_CONTAINER_multipeermap_put (view, 943 if (GNUNET_YES != GNUNET_CONTAINER_multipeermap_put (view,
941 peer, 944 peer,
942 NULL, 945 NULL,
@@ -2166,6 +2169,9 @@ do_mal_round (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
2166 else 2169 else
2167 check_peer_live (peer_ctx); 2170 check_peer_live (peer_ctx);
2168 } 2171 }
2172 else
2173 peer_ctx = create_peer_ctx (&attacked_peer);
2174 check_peer_live (peer_ctx);
2169 2175
2170 /* The maximum of pushes we're going to send this round */ 2176 /* The maximum of pushes we're going to send this round */
2171 num_pushes = GNUNET_MIN (GNUNET_MIN (push_limit - 1, 2177 num_pushes = GNUNET_MIN (GNUNET_MIN (push_limit - 1,
diff --git a/src/rps/rps_api.c b/src/rps/rps_api.c
index 42cec9761..e06f73b9c 100644
--- a/src/rps/rps_api.c
+++ b/src/rps/rps_api.c
@@ -165,7 +165,7 @@ mq_error_handler (void *cls, enum GNUNET_MQ_Error error)
165{ 165{
166 struct GNUNET_RPS_Handle *h = cls; 166 struct GNUNET_RPS_Handle *h = cls;
167 //TODO LOG 167 //TODO LOG
168 LOG (GNUNET_ERROR_TYPE_WARNING, "Some problem with the message queue. error: %i\n\ 168 LOG (GNUNET_ERROR_TYPE_WARNING, "Problem with message queue. error: %i\n\
169 1: READ,\n\ 169 1: READ,\n\
170 2: WRITE,\n\ 170 2: WRITE,\n\
171 4: TIMEOUT\n", 171 4: TIMEOUT\n",
@@ -426,7 +426,6 @@ GNUNET_RPS_request_cancel (struct GNUNET_RPS_Request_Handle *rh)
426 "Cancelling request with id %" PRIu32 "\n", 426 "Cancelling request with id %" PRIu32 "\n",
427 rh->id); 427 rh->id);
428 428
429 GNUNET_array_append (req_handlers, req_handlers_size, *rh);
430 ev = GNUNET_MQ_msg (msg, GNUNET_MESSAGE_TYPE_RPS_CS_REQUEST_CANCEL); 429 ev = GNUNET_MQ_msg (msg, GNUNET_MESSAGE_TYPE_RPS_CS_REQUEST_CANCEL);
431 msg->id = htonl (rh->id); 430 msg->id = htonl (rh->id);
432 GNUNET_MQ_send (rh->rps_handle->mq, ev); 431 GNUNET_MQ_send (rh->rps_handle->mq, ev);