aboutsummaryrefslogtreecommitdiff
path: root/src/rps
diff options
context:
space:
mode:
authorJulius Bünger <buenger@mytum.de>2016-09-29 23:46:25 +0000
committerJulius Bünger <buenger@mytum.de>2016-09-29 23:46:25 +0000
commitcd9b18db5c906675a904e67d0ee865ac40c1324f (patch)
tree52cdf951aadcd6da13ce1069c3a955b6be983bdf /src/rps
parentbd9864969f7b82f3fa927bf5903d39bf6c77b346 (diff)
downloadgnunet-cd9b18db5c906675a904e67d0ee865ac40c1324f.tar.gz
gnunet-cd9b18db5c906675a904e67d0ee865ac40c1324f.zip
-fix rps service: prevent calling _request_cancel() twice
Diffstat (limited to 'src/rps')
-rw-r--r--src/rps/gnunet-service-rps.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/rps/gnunet-service-rps.c b/src/rps/gnunet-service-rps.c
index 11a2215c5..344140ce8 100644
--- a/src/rps/gnunet-service-rps.c
+++ b/src/rps/gnunet-service-rps.c
@@ -926,7 +926,10 @@ destroy_reply_cls (struct ReplyCls *rep_cls)
926 926
927 cli_ctx = rep_cls->cli_ctx; 927 cli_ctx = rep_cls->cli_ctx;
928 GNUNET_assert (NULL != cli_ctx); 928 GNUNET_assert (NULL != cli_ctx);
929 RPS_sampler_request_cancel (rep_cls->req_handle); 929 if (NULL != rep_cls->req_handle)
930 {
931 RPS_sampler_request_cancel (rep_cls->req_handle);
932 }
930 GNUNET_CONTAINER_DLL_remove (cli_ctx->rep_cls_head, 933 GNUNET_CONTAINER_DLL_remove (cli_ctx->rep_cls_head,
931 cli_ctx->rep_cls_tail, 934 cli_ctx->rep_cls_tail,
932 rep_cls); 935 rep_cls);
@@ -1035,6 +1038,7 @@ client_respond (void *cls,
1035 1038
1036 cli_ctx = reply_cls->cli_ctx; 1039 cli_ctx = reply_cls->cli_ctx;
1037 GNUNET_assert (NULL != cli_ctx); 1040 GNUNET_assert (NULL != cli_ctx);
1041 reply_cls->req_handle = NULL;
1038 destroy_reply_cls (reply_cls); 1042 destroy_reply_cls (reply_cls);
1039 GNUNET_MQ_send (cli_ctx->mq, ev); 1043 GNUNET_MQ_send (cli_ctx->mq, ev);
1040} 1044}