From 102ef991828f70f8a4baa9755be02e5a17a67110 Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Tue, 20 Sep 2016 01:22:02 +0000 Subject: [PATCH] -use is_fwd to retrieve traffic direction --- src/cadet/gnunet-service-cadet_connection.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/cadet/gnunet-service-cadet_connection.c b/src/cadet/gnunet-service-cadet_connection.c index eb6ba5aa7..5930728a0 100644 --- a/src/cadet/gnunet-service-cadet_connection.c +++ b/src/cadet/gnunet-service-cadet_connection.c @@ -3067,7 +3067,6 @@ void GCC_neighbor_disconnected (struct CadetConnection *c, struct CadetPeer *peer) { struct CadetFlowControl *fc; - struct CadetPeer *hop; char peer_name[16]; int fwd; @@ -3080,14 +3079,12 @@ GCC_neighbor_disconnected (struct CadetConnection *c, struct CadetPeer *peer) invalidate_paths (c, peer); - hop = get_prev_hop (c); - if (NULL == hop) + fwd = is_fwd (c, peer); + if (GNUNET_SYSERR == fwd) { - /* Path was NULL, we should have deleted the connection. */ GNUNET_break (0); return; } - fwd = (peer == hop); if ( (GNUNET_YES == GCC_is_terminal (c, fwd)) || (GNUNET_NO != c->destroy) ) { -- 2.25.1