aboutsummaryrefslogtreecommitdiff
path: root/src/set
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2013-12-24 20:20:36 +0000
committerFlorian Dold <florian.dold@gmail.com>2013-12-24 20:20:36 +0000
commitca93470efe19d2c9e61376ae21d3a4d0986ae817 (patch)
tree6926a0d785ba80a8e3b59255db3ac37adc0f6508 /src/set
parentc0e3537bc400698137b43a78fc63ca96ae6315a9 (diff)
downloadgnunet-ca93470efe19d2c9e61376ae21d3a4d0986ae817.tar.gz
gnunet-ca93470efe19d2c9e61376ae21d3a4d0986ae817.zip
- destroy channel after timeout
Diffstat (limited to 'src/set')
-rw-r--r--src/set/gnunet-service-set.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/set/gnunet-service-set.c b/src/set/gnunet-service-set.c
index b84a79453..0e8b6e6e2 100644
--- a/src/set/gnunet-service-set.c
+++ b/src/set/gnunet-service-set.c
@@ -452,6 +452,16 @@ incoming_destroy (struct Operation *incoming)
452 GNUNET_SCHEDULER_cancel (incoming->state->timeout_task); 452 GNUNET_SCHEDULER_cancel (incoming->state->timeout_task);
453 incoming->state->timeout_task = GNUNET_SCHEDULER_NO_TASK; 453 incoming->state->timeout_task = GNUNET_SCHEDULER_NO_TASK;
454 } 454 }
455 if (NULL != incoming->mq)
456 {
457 GNUNET_MQ_destroy (incoming->mq);
458 incoming->mq = NULL;
459 }
460 if (NULL != incoming->channel)
461 {
462 GNUNET_MESH_channel_destroy (incoming->channel);
463 incoming->channel = NULL;
464 }
455 GNUNET_assert (NULL != incoming->state); 465 GNUNET_assert (NULL != incoming->state);
456 GNUNET_free (incoming->state); 466 GNUNET_free (incoming->state);
457 // make sure that the tunnel end handler will not 467 // make sure that the tunnel end handler will not
@@ -1196,6 +1206,9 @@ static void
1196handle_incoming_disconnect (struct Operation *op) 1206handle_incoming_disconnect (struct Operation *op)
1197{ 1207{
1198 GNUNET_assert (GNUNET_YES == op->is_incoming); 1208 GNUNET_assert (GNUNET_YES == op->is_incoming);
1209 /* channel is already dead, incoming_destroy must not
1210 * destroy it ... */
1211 op->channel = NULL;
1199 incoming_destroy (op); 1212 incoming_destroy (op);
1200 op->vt = NULL; 1213 op->vt = NULL;
1201} 1214}