diff options
author | Julius Bünger <buenger@mytum.de> | 2018-10-31 11:59:51 +0100 |
---|---|---|
committer | Julius Bünger <buenger@mytum.de> | 2018-10-31 12:04:02 +0100 |
commit | c376dd1359d198394b240fd15a13877b8b236fe4 (patch) | |
tree | d350b8dbe6233c10f4002693e4fbae556da78f54 /src/rps/gnunet-rps-profiler.c | |
parent | b6395044ac67983a271581839e945027f6c089cf (diff) | |
download | gnunet-c376dd1359d198394b240fd15a13877b8b236fe4.tar.gz gnunet-c376dd1359d198394b240fd15a13877b8b236fe4.zip |
RPS profiler: Try to avoid assertion on request_cancel
Diffstat (limited to 'src/rps/gnunet-rps-profiler.c')
-rw-r--r-- | src/rps/gnunet-rps-profiler.c | 8 |
1 files changed, 7 insertions, 1 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) | |||
909 | rps_peer->num_pending_reps--; | 909 | rps_peer->num_pending_reps--; |
910 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 910 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
911 | "Cancelling rps get reply\n"); | 911 | "Cancelling rps get reply\n"); |
912 | GNUNET_assert (NULL != pending_rep->req_handle); | ||
912 | GNUNET_RPS_request_cancel (pending_rep->req_handle); | 913 | GNUNET_RPS_request_cancel (pending_rep->req_handle); |
913 | GNUNET_free (pending_rep); | 914 | GNUNET_free (pending_rep); |
914 | } | 915 | } |
@@ -1288,7 +1289,11 @@ rps_disconnect_adapter (void *cls, | |||
1288 | cancel_request (pending_rep); | 1289 | cancel_request (pending_rep); |
1289 | } | 1290 | } |
1290 | GNUNET_assert (h == peer->rps_handle); | 1291 | GNUNET_assert (h == peer->rps_handle); |
1291 | GNUNET_RPS_disconnect (h); | 1292 | if (NULL != h) |
1293 | { | ||
1294 | GNUNET_RPS_disconnect (h); | ||
1295 | h = NULL; | ||
1296 | } | ||
1292 | peer->rps_handle = NULL; | 1297 | peer->rps_handle = NULL; |
1293 | } | 1298 | } |
1294 | } | 1299 | } |
@@ -1788,6 +1793,7 @@ profiler_reply_handle (void *cls, | |||
1788 | unsigned int i; | 1793 | unsigned int i; |
1789 | struct PendingReply *pending_rep = (struct PendingReply *) cls; | 1794 | struct PendingReply *pending_rep = (struct PendingReply *) cls; |
1790 | 1795 | ||
1796 | pending_rep->req_handle = NULL; | ||
1791 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "profiler_reply_handle()\n"); | 1797 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "profiler_reply_handle()\n"); |
1792 | rps_peer = pending_rep->rps_peer; | 1798 | rps_peer = pending_rep->rps_peer; |
1793 | (void) GNUNET_asprintf (&file_name, | 1799 | (void) GNUNET_asprintf (&file_name, |