[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r32984 - gnunet/src/mesh
From: |
gnunet |
Subject: |
[GNUnet-SVN] r32984 - gnunet/src/mesh |
Date: |
Wed, 9 Apr 2014 12:56:47 +0200 |
Author: bartpolot
Date: 2014-04-09 12:56:47 +0200 (Wed, 09 Apr 2014)
New Revision: 32984
Modified:
gnunet/src/mesh/gnunet-service-mesh_channel.c
Log:
- always check if channel was last, then mark tunnel for destruction
Modified: gnunet/src/mesh/gnunet-service-mesh_channel.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh_channel.c 2014-04-09 10:56:44 UTC
(rev 32983)
+++ gnunet/src/mesh/gnunet-service-mesh_channel.c 2014-04-09 10:56:47 UTC
(rev 32984)
@@ -927,7 +927,7 @@
/* If root is not NULL, notify.
* If it's NULL, check lid_root. When a local destroy comes in, root
* is set to NULL but lid_root is left untouched. In this case, do nothing,
- * the client is the one who reuqested the channel to be destroyed.
+ * the client is the one who requested the channel to be destroyed.
*/
if (NULL != ch->root)
GML_send_channel_destroy (ch->root, ch->lid_root);
@@ -1127,7 +1127,6 @@
{
struct MeshTunnel3 *t = rel->ch->t;
GMCH_destroy (rel->ch);
- GMT_destroy_if_empty (t);
return GNUNET_YES;
}
return GNUNET_NO;
@@ -1341,6 +1340,7 @@
GMCH_destroy (struct MeshChannel *ch)
{
struct MeshClient *c;
+ struct MeshTunnel3 *t;
if (NULL == ch)
return;
@@ -1367,10 +1367,12 @@
channel_rel_free_all (ch->root_rel);
channel_rel_free_all (ch->dest_rel);
- GMT_remove_channel (ch->t, ch);
+ t = ch->t;
+ GMT_remove_channel (t, ch);
GNUNET_STATISTICS_update (stats, "# channels", -1, GNUNET_NO);
GNUNET_free (ch);
+ GMT_destroy_if_empty (t);
}
@@ -1792,10 +1794,7 @@
t = ch->t;
send_destroy (ch, GNUNET_NO);
if (0 == ch->pending_messages)
- {
GMCH_destroy (ch);
- GMT_destroy_if_empty (t);
- }
}
@@ -2222,8 +2221,6 @@
const struct GNUNET_MESH_ChannelManage *msg,
int fwd)
{
- struct MeshTunnel3 *t;
-
/* If this is a remote (non-loopback) channel, find 'fwd'. */
if (GNUNET_SYSERR == fwd)
{
@@ -2243,10 +2240,9 @@
return;
}
- t = ch->t;
+
send_destroy (ch, GNUNET_YES);
GMCH_destroy (ch);
- GMT_destroy_if_empty (t);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r32984 - gnunet/src/mesh,
gnunet <=