commit cd9b18db5c906675a904e67d0ee865ac40c1324f
parent bd9864969f7b82f3fa927bf5903d39bf6c77b346
Author: Julius Bünger <buenger@mytum.de>
Date: Thu, 29 Sep 2016 23:46:25 +0000
-fix rps service: prevent calling _request_cancel() twice
Diffstat:
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git 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)
cli_ctx = rep_cls->cli_ctx;
GNUNET_assert (NULL != cli_ctx);
- RPS_sampler_request_cancel (rep_cls->req_handle);
+ if (NULL != rep_cls->req_handle)
+ {
+ RPS_sampler_request_cancel (rep_cls->req_handle);
+ }
GNUNET_CONTAINER_DLL_remove (cli_ctx->rep_cls_head,
cli_ctx->rep_cls_tail,
rep_cls);
@@ -1035,6 +1038,7 @@ client_respond (void *cls,
cli_ctx = reply_cls->cli_ctx;
GNUNET_assert (NULL != cli_ctx);
+ reply_cls->req_handle = NULL;
destroy_reply_cls (reply_cls);
GNUNET_MQ_send (cli_ctx->mq, ev);
}