From 201f6fcf4416b92963a04e396ab5260e3f4b48be Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Fri, 30 Aug 2013 03:43:00 +0000 Subject: [PATCH] - fix shutdown when root and destination are the same client --- src/mesh/gnunet-service-mesh-enc.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/mesh/gnunet-service-mesh-enc.c b/src/mesh/gnunet-service-mesh-enc.c index a8aee5857..660446be0 100644 --- a/src/mesh/gnunet-service-mesh-enc.c +++ b/src/mesh/gnunet-service-mesh-enc.c @@ -4154,10 +4154,13 @@ channel_send_destroy (struct MeshChannel *ch) peer2s (ch->t->peer), ch->gid); - if (NULL != ch->root) + if (channel_is_terminal (ch, GNUNET_NO)) { - msg.chid = htonl (ch->lid_root); - send_local_channel_destroy (ch, GNUNET_NO); + if (NULL != ch->root) + { + msg.chid = htonl (ch->lid_root); + send_local_channel_destroy (ch, GNUNET_NO); + } } else { @@ -4165,10 +4168,13 @@ channel_send_destroy (struct MeshChannel *ch) send_prebuilt_message_channel (&msg.header, ch, GNUNET_NO); } - if (NULL != ch->dest) + if (channel_is_terminal (ch, GNUNET_YES)) { - msg.chid = htonl (ch->lid_dest); - send_local_channel_destroy (ch, GNUNET_YES); + if (NULL != ch->dest) + { + msg.chid = htonl (ch->lid_dest); + send_local_channel_destroy (ch, GNUNET_YES); + } } else { -- 2.25.1