diff options
Diffstat (limited to 'src/rps/gnunet-rps-profiler.c')
-rw-r--r-- | src/rps/gnunet-rps-profiler.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/rps/gnunet-rps-profiler.c b/src/rps/gnunet-rps-profiler.c index f2a8083e7..b17fb6a50 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, |
@@ -2426,10 +2432,10 @@ post_test_shutdown_ready_cb (void *cls, | |||
2426 | GNUNET_TESTBED_operation_done (rps_peer->stat_op); | 2432 | GNUNET_TESTBED_operation_done (rps_peer->stat_op); |
2427 | } | 2433 | } |
2428 | 2434 | ||
2429 | //write_final_stats (); | 2435 | write_final_stats (); |
2430 | if (GNUNET_YES == check_statistics_collect_completed()) | 2436 | if (GNUNET_YES == check_statistics_collect_completed()) |
2431 | { | 2437 | { |
2432 | write_final_stats (); | 2438 | //write_final_stats (); |
2433 | GNUNET_free (stat_cls); | 2439 | GNUNET_free (stat_cls); |
2434 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 2440 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
2435 | "Shutting down\n"); | 2441 | "Shutting down\n"); |