diff options
author | Bart Polot <bart@net.in.tum.de> | 2016-09-20 01:22:02 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2016-09-20 01:22:02 +0000 |
commit | 102ef991828f70f8a4baa9755be02e5a17a67110 (patch) | |
tree | 4882b5164316b8dd65fbc6cb7f4eb57e5608ae0d | |
parent | 38fb8781ef545244d6b8ce9151d5968deb7ab1a1 (diff) |
-use is_fwd to retrieve traffic direction
-rw-r--r-- | src/cadet/gnunet-service-cadet_connection.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/cadet/gnunet-service-cadet_connection.c b/src/cadet/gnunet-service-cadet_connection.c index eb6ba5aa7c..5930728a0a 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) ) { |