aboutsummaryrefslogtreecommitdiff
path: root/src/set/gnunet-service-set_union.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2014-11-24 14:06:23 +0000
committerChristian Grothoff <christian@grothoff.org>2014-11-24 14:06:23 +0000
commit30a574dc8b01e16a6b70e384a8c4fe05a6ffd861 (patch)
tree37d16c491c94d3388d2a7d4de959e4c9f591d403 /src/set/gnunet-service-set_union.c
parent82f034f771b4fd8e18c61487f4bd239e0e200408 (diff)
downloadgnunet-30a574dc8b01e16a6b70e384a8c4fe05a6ffd861.tar.gz
gnunet-30a574dc8b01e16a6b70e384a8c4fe05a6ffd861.zip
-do not do GC for each destroyed operation on client disconnect
Diffstat (limited to 'src/set/gnunet-service-set_union.c')
-rw-r--r--src/set/gnunet-service-set_union.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/set/gnunet-service-set_union.c b/src/set/gnunet-service-set_union.c
index 10579779b..77e8502d6 100644
--- a/src/set/gnunet-service-set_union.c
+++ b/src/set/gnunet-service-set_union.c
@@ -312,7 +312,7 @@ fail_union_operation (struct Operation *op)
312 msg->request_id = htonl (op->spec->client_request_id); 312 msg->request_id = htonl (op->spec->client_request_id);
313 msg->element_type = htons (0); 313 msg->element_type = htons (0);
314 GNUNET_MQ_send (op->spec->set->client_mq, ev); 314 GNUNET_MQ_send (op->spec->set->client_mq, ev);
315 _GSS_operation_destroy (op); 315 _GSS_operation_destroy (op, GNUNET_YES);
316} 316}
317 317
318 318
@@ -984,12 +984,13 @@ send_done_and_destroy (void *cls)
984 struct GNUNET_MQ_Envelope *ev; 984 struct GNUNET_MQ_Envelope *ev;
985 struct GNUNET_SET_ResultMessage *rm; 985 struct GNUNET_SET_ResultMessage *rm;
986 int keep = op->keep; 986 int keep = op->keep;
987
987 ev = GNUNET_MQ_msg (rm, GNUNET_MESSAGE_TYPE_SET_RESULT); 988 ev = GNUNET_MQ_msg (rm, GNUNET_MESSAGE_TYPE_SET_RESULT);
988 rm->request_id = htonl (op->spec->client_request_id); 989 rm->request_id = htonl (op->spec->client_request_id);
989 rm->result_status = htons (GNUNET_SET_STATUS_DONE); 990 rm->result_status = htons (GNUNET_SET_STATUS_DONE);
990 rm->element_type = htons (0); 991 rm->element_type = htons (0);
991 GNUNET_MQ_send (op->spec->set->client_mq, ev); 992 GNUNET_MQ_send (op->spec->set->client_mq, ev);
992 _GSS_operation_destroy (op); 993 _GSS_operation_destroy (op, GNUNET_YES);
993 if (GNUNET_YES == keep) 994 if (GNUNET_YES == keep)
994 GNUNET_free (op); 995 GNUNET_free (op);
995} 996}
@@ -1358,8 +1359,9 @@ union_peer_disconnect (struct Operation *op)
1358 msg->result_status = htons (GNUNET_SET_STATUS_FAILURE); 1359 msg->result_status = htons (GNUNET_SET_STATUS_FAILURE);
1359 msg->element_type = htons (0); 1360 msg->element_type = htons (0);
1360 GNUNET_MQ_send (op->spec->set->client_mq, ev); 1361 GNUNET_MQ_send (op->spec->set->client_mq, ev);
1361 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "other peer disconnected prematurely\n"); 1362 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
1362 _GSS_operation_destroy (op); 1363 "other peer disconnected prematurely\n");
1364 _GSS_operation_destroy (op, GNUNET_YES);
1363 return; 1365 return;
1364 } 1366 }
1365 // else: the session has already been concluded 1367 // else: the session has already been concluded