[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r31930 - gnunet/src/mesh
From: |
gnunet |
Subject: |
[GNUnet-SVN] r31930 - gnunet/src/mesh |
Date: |
Thu, 16 Jan 2014 13:12:12 +0100 |
Author: bartpolot
Date: 2014-01-16 13:12:12 +0100 (Thu, 16 Jan 2014)
New Revision: 31930
Modified:
gnunet/src/mesh/gnunet-service-mesh_tunnel.c
Log:
-when tunnel is empty
-- don't end connections
-- don't stop encryption handshake
Modified: gnunet/src/mesh/gnunet-service-mesh_tunnel.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh_tunnel.c 2014-01-16 11:54:05 UTC
(rev 31929)
+++ gnunet/src/mesh/gnunet-service-mesh_tunnel.c 2014-01-16 12:12:12 UTC
(rev 31930)
@@ -1995,9 +1995,15 @@
delayed_destroy (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
{
struct MeshTunnel3 *t = cls;
+ struct MeshTConnection *iter;
t->destroy_task = GNUNET_SCHEDULER_NO_TASK;
t->cstate = MESH_TUNNEL3_SHUTDOWN;
+
+ for (iter = t->connection_head; NULL != iter; iter = iter->next)
+ {
+ GMC_send_destroy (iter->c);
+ }
GMT_destroy (t);
}
@@ -2012,24 +2018,9 @@
void
GMT_destroy_empty (struct MeshTunnel3 *t)
{
- struct MeshTConnection *iter;
-
LOG (GNUNET_ERROR_TYPE_DEBUG, "Tunnel %s empty: destroying scheduled\n",
GMT_2s (t));
- for (iter = t->connection_head; NULL != iter; iter = iter->next)
- {
- GMC_send_destroy (iter->c);
- }
- if (GNUNET_SCHEDULER_NO_TASK != t->rekey_task)
- {
- t->estate = MESH_TUNNEL3_KEY_UNINITIALIZED;
- GNUNET_SCHEDULER_cancel (t->rekey_task);
- t->rekey_task = GNUNET_SCHEDULER_NO_TASK;
- GNUNET_free (t->kx_ctx);
- t->kx_ctx = NULL;
- }
- t->cstate = MESH_TUNNEL3_NEW;
t->destroy_task = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_MINUTES,
&delayed_destroy, t);
}
@@ -2100,7 +2091,14 @@
GMP_set_tunnel (t->peer, NULL);
if (GNUNET_SCHEDULER_NO_TASK != t->rekey_task)
+ {
GNUNET_SCHEDULER_cancel (t->rekey_task);
+ t->rekey_task = GNUNET_SCHEDULER_NO_TASK;
+ if (NULL != t->kx_ctx)
+ GNUNET_free (t->kx_ctx);
+ else
+ GNUNET_break (0);
+ }
GNUNET_free (t);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r31930 - gnunet/src/mesh,
gnunet <=