aboutsummaryrefslogtreecommitdiff
path: root/src/rps/gnunet-service-rps.c
diff options
context:
space:
mode:
authorJulius Bünger <buenger@mytum.de>2018-09-26 21:15:01 +0200
committerJulius Bünger <buenger@mytum.de>2018-09-26 21:15:01 +0200
commitcf847c7470937fa160ccec6588acdc3c46c5e202 (patch)
tree26da6866e88a2569d8d7791484b8470f31d42874 /src/rps/gnunet-service-rps.c
parent8d45a78fbc09680716aefd858e87f3cfc4363e37 (diff)
downloadgnunet-cf847c7470937fa160ccec6588acdc3c46c5e202.tar.gz
gnunet-cf847c7470937fa160ccec6588acdc3c46c5e202.zip
Handle cancellation of view updates
Diffstat (limited to 'src/rps/gnunet-service-rps.c')
-rw-r--r--src/rps/gnunet-service-rps.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/rps/gnunet-service-rps.c b/src/rps/gnunet-service-rps.c
index 3dd887d47..4e06f5a49 100644
--- a/src/rps/gnunet-service-rps.c
+++ b/src/rps/gnunet-service-rps.c
@@ -2733,6 +2733,27 @@ handle_client_view_request (void *cls,
2733} 2733}
2734 2734
2735 2735
2736static void
2737handle_client_view_request_cancel (void *cls,
2738 const struct GNUNET_MessageHeader *msg)
2739{
2740 struct ClientContext *cli_ctx = cls;
2741 uint64_t num_updates;
2742
2743 LOG (GNUNET_ERROR_TYPE_DEBUG,
2744 "Client does not want to receive updates of view any more.\n",
2745 num_updates);
2746
2747 GNUNET_assert (NULL != cli_ctx);
2748 cli_ctx->view_updates_left = 0;
2749 if (GNUNET_YES == cli_ctx->stream_update)
2750 {
2751 destroy_cli_ctx (cli_ctx);
2752 }
2753 GNUNET_SERVICE_client_continue (cli_ctx->client);
2754}
2755
2756
2736/** 2757/**
2737 * Handle RPS request for biased stream from the client. 2758 * Handle RPS request for biased stream from the client.
2738 * 2759 *
@@ -4079,6 +4100,10 @@ GNUNET_SERVICE_MAIN
4079 GNUNET_MESSAGE_TYPE_RPS_CS_DEBUG_VIEW_REQUEST, 4100 GNUNET_MESSAGE_TYPE_RPS_CS_DEBUG_VIEW_REQUEST,
4080 struct GNUNET_RPS_CS_DEBUG_ViewRequest, 4101 struct GNUNET_RPS_CS_DEBUG_ViewRequest,
4081 NULL), 4102 NULL),
4103 GNUNET_MQ_hd_fixed_size (client_view_request_cancel,
4104 GNUNET_MESSAGE_TYPE_RPS_CS_DEBUG_VIEW_CANCEL,
4105 struct GNUNET_MessageHeader,
4106 NULL),
4082 GNUNET_MQ_hd_fixed_size (client_stream_request, 4107 GNUNET_MQ_hd_fixed_size (client_stream_request,
4083 GNUNET_MESSAGE_TYPE_RPS_CS_DEBUG_STREAM_REQUEST, 4108 GNUNET_MESSAGE_TYPE_RPS_CS_DEBUG_STREAM_REQUEST,
4084 struct GNUNET_RPS_CS_DEBUG_StreamRequest, 4109 struct GNUNET_RPS_CS_DEBUG_StreamRequest,