From 3a7ec58a0967162a953e0b7dedf7dbb68cd1c430 Mon Sep 17 00:00:00 2001 From: LRN Date: Fri, 17 Jan 2014 04:12:59 +0000 Subject: Check that we're not scheduling destroy twice --- src/mesh/gnunet-service-mesh_tunnel.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/mesh/gnunet-service-mesh_tunnel.c b/src/mesh/gnunet-service-mesh_tunnel.c index ed556c811..afb739ee5 100644 --- a/src/mesh/gnunet-service-mesh_tunnel.c +++ b/src/mesh/gnunet-service-mesh_tunnel.c @@ -2018,6 +2018,13 @@ delayed_destroy (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) void GMT_destroy_empty (struct MeshTunnel3 *t) { + if (GNUNET_SCHEDULER_NO_TASK != t->destroy_task) + { + LOG (GNUNET_ERROR_TYPE_DEBUG, "Tunnel %s is already scheduled for destruction\n", + GMT_2s (t)); + return; + } + LOG (GNUNET_ERROR_TYPE_DEBUG, "Tunnel %s empty: destroying scheduled\n", GMT_2s (t)); -- cgit v1.2.3