From: Bart Polot Date: Fri, 30 Aug 2013 03:43:00 +0000 (+0000) Subject: - fix shutdown when root and destination are the same client X-Git-Tag: initial-import-from-subversion-38251~7602 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=201f6fcf4416b92963a04e396ab5260e3f4b48be;p=oweals%2Fgnunet.git - fix shutdown when root and destination are the same client --- 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 {