aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJulius Bünger <buenger@mytum.de>2015-03-25 17:17:04 +0000
committerJulius Bünger <buenger@mytum.de>2015-03-25 17:17:04 +0000
commit038af3d26243048d42adb394f6911da8b6a3fd7e (patch)
tree9e7c69c1625122a9af74eaef21c4fdb998ee49b8 /src
parente98bb339cbe55a6addc5dfb6a6a1cdbd0c27bb00 (diff)
downloadgnunet-038af3d26243048d42adb394f6911da8b6a3fd7e.tar.gz
gnunet-038af3d26243048d42adb394f6911da8b6a3fd7e.zip
-corrected peer_is_live() checking
Diffstat (limited to 'src')
-rw-r--r--src/rps/gnunet-service-rps.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/rps/gnunet-service-rps.c b/src/rps/gnunet-service-rps.c
index b0551df37..889f7b658 100644
--- a/src/rps/gnunet-service-rps.c
+++ b/src/rps/gnunet-service-rps.c
@@ -615,6 +615,13 @@ peer_is_live (struct PeerContext *peer_ctx)
615{ 615{
616 struct GNUNET_PeerIdentity *peer; 616 struct GNUNET_PeerIdentity *peer;
617 617
618 /* Cancle is_live_task if still scheduled */
619 if (NULL != peer_ctx->is_live_task)
620 {
621 GNUNET_CADET_notify_transmit_ready_cancel (peer_ctx->is_live_task);
622 peer_ctx->is_live_task = NULL;
623 }
624
618 peer = &peer_ctx->peer_id; 625 peer = &peer_ctx->peer_id;
619 set_peer_flag (peer_ctx, VALID); 626 set_peer_flag (peer_ctx, VALID);
620 627
@@ -629,12 +636,6 @@ peer_is_live (struct PeerContext *peer_ctx)
629 GNUNET_array_grow (peer_ctx->outstanding_ops, peer_ctx->num_outstanding_ops, 0); 636 GNUNET_array_grow (peer_ctx->outstanding_ops, peer_ctx->num_outstanding_ops, 0);
630 } 637 }
631 638
632 if (NULL != peer_ctx->is_live_task)
633 {
634 GNUNET_CADET_notify_transmit_ready_cancel (peer_ctx->is_live_task);
635 peer_ctx->is_live_task = NULL;
636 }
637
638 return 0; 639 return 0;
639} 640}
640 641
@@ -1792,7 +1793,11 @@ peer_remove_cb (void *cls, const struct GNUNET_PeerIdentity *key, void *value)
1792 0); 1793 0);
1793 1794
1794 if (NULL != peer_ctx->mq) 1795 if (NULL != peer_ctx->mq)
1796 {
1795 GNUNET_MQ_destroy (peer_ctx->mq); 1797 GNUNET_MQ_destroy (peer_ctx->mq);
1798 peer_ctx->mq = NULL;
1799 }
1800
1796 1801
1797 if (NULL != peer_ctx->is_live_task) 1802 if (NULL != peer_ctx->is_live_task)
1798 { 1803 {