diff options
author | Julius Bünger <buenger@mytum.de> | 2018-09-26 21:14:13 +0200 |
---|---|---|
committer | Julius Bünger <buenger@mytum.de> | 2018-09-26 21:14:13 +0200 |
commit | 8d45a78fbc09680716aefd858e87f3cfc4363e37 (patch) | |
tree | 9c7d42bd4bc3deb97b0aa9a4c9d3665e2cb1bfce /src/rps | |
parent | 1d724e33b5f1eef331be967665e603cc12e6a375 (diff) | |
download | gnunet-8d45a78fbc09680716aefd858e87f3cfc4363e37.tar.gz gnunet-8d45a78fbc09680716aefd858e87f3cfc4363e37.zip |
Remove leftovers of architecture change
Diffstat (limited to 'src/rps')
-rw-r--r-- | src/rps/gnunet-service-rps.c | 47 |
1 files changed, 1 insertions, 46 deletions
diff --git a/src/rps/gnunet-service-rps.c b/src/rps/gnunet-service-rps.c index e3714bdba..3dd887d47 100644 --- a/src/rps/gnunet-service-rps.c +++ b/src/rps/gnunet-service-rps.c | |||
@@ -1759,12 +1759,6 @@ struct ClientContext | |||
1759 | struct GNUNET_MQ_Handle *mq; | 1759 | struct GNUNET_MQ_Handle *mq; |
1760 | 1760 | ||
1761 | /** | 1761 | /** |
1762 | * DLL with handles to single requests from the client | ||
1763 | */ | ||
1764 | struct ReplyCls *rep_cls_head; | ||
1765 | struct ReplyCls *rep_cls_tail; | ||
1766 | |||
1767 | /** | ||
1768 | * @brief How many updates this client expects to receive. | 1762 | * @brief How many updates this client expects to receive. |
1769 | */ | 1763 | */ |
1770 | int64_t view_updates_left; | 1764 | int64_t view_updates_left; |
@@ -2597,34 +2591,9 @@ cleanup_destroyed_channel (void *cls, | |||
2597 | ***********************************************************************/ | 2591 | ***********************************************************************/ |
2598 | 2592 | ||
2599 | static void | 2593 | static void |
2600 | destroy_reply_cls (struct ReplyCls *rep_cls) | ||
2601 | { | ||
2602 | struct ClientContext *cli_ctx; | ||
2603 | |||
2604 | cli_ctx = rep_cls->cli_ctx; | ||
2605 | GNUNET_assert (NULL != cli_ctx); | ||
2606 | if (NULL != rep_cls->req_handle) | ||
2607 | { | ||
2608 | RPS_sampler_request_cancel (rep_cls->req_handle); | ||
2609 | } | ||
2610 | GNUNET_CONTAINER_DLL_remove (cli_ctx->rep_cls_head, | ||
2611 | cli_ctx->rep_cls_tail, | ||
2612 | rep_cls); | ||
2613 | GNUNET_free (rep_cls); | ||
2614 | } | ||
2615 | |||
2616 | |||
2617 | static void | ||
2618 | destroy_cli_ctx (struct ClientContext *cli_ctx) | 2594 | destroy_cli_ctx (struct ClientContext *cli_ctx) |
2619 | { | 2595 | { |
2620 | GNUNET_assert (NULL != cli_ctx); | 2596 | GNUNET_assert (NULL != cli_ctx); |
2621 | if (NULL != cli_ctx->rep_cls_head) | ||
2622 | { | ||
2623 | LOG (GNUNET_ERROR_TYPE_WARNING, | ||
2624 | "Trying to destroy the context of a client that still has pending requests. Going to clean those\n"); | ||
2625 | while (NULL != cli_ctx->rep_cls_head) | ||
2626 | destroy_reply_cls (cli_ctx->rep_cls_head); | ||
2627 | } | ||
2628 | GNUNET_CONTAINER_DLL_remove (cli_ctx_head, | 2597 | GNUNET_CONTAINER_DLL_remove (cli_ctx_head, |
2629 | cli_ctx_tail, | 2598 | cli_ctx_tail, |
2630 | cli_ctx); | 2599 | cli_ctx); |
@@ -3800,21 +3769,7 @@ shutdown_task (void *cls) | |||
3800 | NULL != cli_ctx_head; | 3769 | NULL != cli_ctx_head; |
3801 | client_ctx = cli_ctx_head) | 3770 | client_ctx = cli_ctx_head) |
3802 | { | 3771 | { |
3803 | /* Clean pending requests to the sampler */ | 3772 | destroy_cli_ctx (client_ctx); |
3804 | for (reply_cls = client_ctx->rep_cls_head; | ||
3805 | NULL != client_ctx->rep_cls_head; | ||
3806 | reply_cls = client_ctx->rep_cls_head) | ||
3807 | { | ||
3808 | RPS_sampler_request_cancel (reply_cls->req_handle); | ||
3809 | GNUNET_CONTAINER_DLL_remove (client_ctx->rep_cls_head, | ||
3810 | client_ctx->rep_cls_tail, | ||
3811 | reply_cls); | ||
3812 | GNUNET_free (reply_cls); | ||
3813 | } | ||
3814 | GNUNET_CONTAINER_DLL_remove (cli_ctx_head, | ||
3815 | cli_ctx_tail, | ||
3816 | client_ctx); | ||
3817 | GNUNET_free (client_ctx); | ||
3818 | } | 3773 | } |
3819 | GNUNET_PEERINFO_notify_cancel (peerinfo_notify_handle); | 3774 | GNUNET_PEERINFO_notify_cancel (peerinfo_notify_handle); |
3820 | GNUNET_PEERINFO_disconnect (peerinfo_handle); | 3775 | GNUNET_PEERINFO_disconnect (peerinfo_handle); |