aboutsummaryrefslogtreecommitdiff
path: root/src/cadet/gnunet-service-cadet-new_channel.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-01-22 11:44:22 +0100
committerChristian Grothoff <christian@grothoff.org>2017-01-22 11:44:22 +0100
commite8e9d033819c20be0ce6a6e2473e279e23cc80b4 (patch)
tree094fab075bd319fe7819c3d6f1375c14c4555f43 /src/cadet/gnunet-service-cadet-new_channel.c
parent2ecdd817ef433aa4ff3ddc188a30dd0408c469e1 (diff)
downloadgnunet-e8e9d033819c20be0ce6a6e2473e279e23cc80b4.tar.gz
gnunet-e8e9d033819c20be0ce6a6e2473e279e23cc80b4.zip
only send CHANNEL_DESTROY message if we at least send the CHANNEL_CREATE message, and not if the tunnel never went up in the first place
Diffstat (limited to 'src/cadet/gnunet-service-cadet-new_channel.c')
-rw-r--r--src/cadet/gnunet-service-cadet-new_channel.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/cadet/gnunet-service-cadet-new_channel.c b/src/cadet/gnunet-service-cadet-new_channel.c
index 60e1a7766..4bff1a1c5 100644
--- a/src/cadet/gnunet-service-cadet-new_channel.c
+++ b/src/cadet/gnunet-service-cadet-new_channel.c
@@ -770,9 +770,11 @@ GCCH_channel_local_destroy (struct CadetChannel *ch)
770 ch->destroy = GNUNET_YES; 770 ch->destroy = GNUNET_YES;
771 return; 771 return;
772 } 772 }
773 /* Nothing left to do, just finish destruction */ 773 /* If the we ever sent the CHANNEL_CREATE, we need to send a destroy message. */
774 GCT_send_channel_destroy (ch->t, 774 if (CADET_CHANNEL_NEW != ch->state)
775 ch->ctn); 775 GCT_send_channel_destroy (ch->t,
776 ch->ctn);
777 /* Now finish our clean up */
776 channel_destroy (ch); 778 channel_destroy (ch);
777} 779}
778 780