[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] branch master updated (ec90e2445 -> c376dd135)
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] branch master updated (ec90e2445 -> c376dd135) |
Date: |
Wed, 31 Oct 2018 12:04:21 +0100 |
This is an automated email from the git hooks/post-receive script.
julius-buenger pushed a change to branch master
in repository gnunet.
from ec90e2445 RPS service: Use correct file for sub
new b6395044a RPS service: Try to fix peer destruction during cleanup
new c376dd135 RPS profiler: Try to avoid assertion on request_cancel
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
src/rps/gnunet-rps-profiler.c | 8 +++++++-
src/rps/gnunet-service-rps.c | 11 ++++++++++-
src/rps/rps_api.c | 1 +
3 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/src/rps/gnunet-rps-profiler.c b/src/rps/gnunet-rps-profiler.c
index f2a8083e7..c0059ac3b 100644
--- a/src/rps/gnunet-rps-profiler.c
+++ b/src/rps/gnunet-rps-profiler.c
@@ -909,6 +909,7 @@ cancel_request (struct PendingReply *pending_rep)
rps_peer->num_pending_reps--;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Cancelling rps get reply\n");
+ GNUNET_assert (NULL != pending_rep->req_handle);
GNUNET_RPS_request_cancel (pending_rep->req_handle);
GNUNET_free (pending_rep);
}
@@ -1288,7 +1289,11 @@ rps_disconnect_adapter (void *cls,
cancel_request (pending_rep);
}
GNUNET_assert (h == peer->rps_handle);
- GNUNET_RPS_disconnect (h);
+ if (NULL != h)
+ {
+ GNUNET_RPS_disconnect (h);
+ h = NULL;
+ }
peer->rps_handle = NULL;
}
}
@@ -1788,6 +1793,7 @@ profiler_reply_handle (void *cls,
unsigned int i;
struct PendingReply *pending_rep = (struct PendingReply *) cls;
+ pending_rep->req_handle = NULL;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "profiler_reply_handle()\n");
rps_peer = pending_rep->rps_peer;
(void) GNUNET_asprintf (&file_name,
diff --git a/src/rps/gnunet-service-rps.c b/src/rps/gnunet-service-rps.c
index 2e2fa96a7..d129ba746 100644
--- a/src/rps/gnunet-service-rps.c
+++ b/src/rps/gnunet-service-rps.c
@@ -2690,6 +2690,14 @@ clean_peer (struct Sub *sub,
#endif /* ENABLE_MALICIOUS */
}
+ if (GNUNET_NO == GNUNET_CONTAINER_multipeermap_contains (sub->peer_map,
peer))
+ {
+ /* Peer was already removed by callback on destroyed channel */
+ LOG (GNUNET_ERROR_TYPE_WARNING,
+ "Peer was removed from our knowledge during cleanup\n");
+ return;
+ }
+
if ( (GNUNET_NO == check_peer_send_intention (get_peer_ctx (sub->peer_map,
peer))) &&
(GNUNET_NO == View_contains_peer (sub->view, peer)) &&
@@ -2729,7 +2737,8 @@ cleanup_destroyed_channel (void *cls,
channel_ctx->channel = NULL;
remove_channel_ctx (channel_ctx);
if (NULL != peer_ctx &&
- peer_ctx->send_channel_ctx == channel_ctx)
+ peer_ctx->send_channel_ctx == channel_ctx &&
+ GNUNET_YES == check_sending_channel_needed (channel_ctx->peer_ctx))
{
remove_peer (peer_ctx->sub, &peer_ctx->peer_id);
}
diff --git a/src/rps/rps_api.c b/src/rps/rps_api.c
index bce567678..cfab06f17 100644
--- a/src/rps/rps_api.c
+++ b/src/rps/rps_api.c
@@ -854,6 +854,7 @@ GNUNET_RPS_request_cancel (struct GNUNET_RPS_Request_Handle
*rh)
struct GNUNET_RPS_Handle *h;
h = rh->rps_handle;
+ GNUNET_assert (NULL != rh);
GNUNET_assert (NULL != rh->srh);
remove_stream_request (rh->srh,
h->stream_requests_head,
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnunet] branch master updated (ec90e2445 -> c376dd135),
gnunet <=