From: Bart Polot Date: Thu, 20 Sep 2012 12:32:12 +0000 (+0000) Subject: - reorder for case of shutdown X-Git-Tag: initial-import-from-subversion-38251~11716 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=87a8875eeebfaf98d3a8441adb3f227122e2aab3;p=oweals%2Fgnunet.git - reorder for case of shutdown --- diff --git a/src/mesh/gnunet-service-mesh.c b/src/mesh/gnunet-service-mesh.c index 914862c33..aa3bfea97 100644 --- a/src/mesh/gnunet-service-mesh.c +++ b/src/mesh/gnunet-service-mesh.c @@ -4339,13 +4339,13 @@ tunnel_timeout (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) struct MeshTunnel *t = cls; struct GNUNET_PeerIdentity id; + t->timeout_task = GNUNET_SCHEDULER_NO_TASK; + if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) + return; GNUNET_PEER_resolve(t->id.oid, &id); GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Tunnel %s [%X] timed out. Destroying.\n", GNUNET_i2s(&id), t->id.tid); - if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) - return; - t->timeout_task = GNUNET_SCHEDULER_NO_TASK; tunnel_destroy (t); }