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 /src | |
parent | 38fb8781ef545244d6b8ce9151d5968deb7ab1a1 (diff) | |
download | gnunet-102ef991828f70f8a4baa9755be02e5a17a67110.tar.gz gnunet-102ef991828f70f8a4baa9755be02e5a17a67110.zip |
-use is_fwd to retrieve traffic direction
Diffstat (limited to 'src')
-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 eb6ba5aa7..5930728a0 100644 --- a/src/cadet/gnunet-service-cadet_connection.c +++ b/src/cadet/gnunet-service-cadet_connection.c | |||
@@ -3067,7 +3067,6 @@ void | |||
3067 | GCC_neighbor_disconnected (struct CadetConnection *c, struct CadetPeer *peer) | 3067 | GCC_neighbor_disconnected (struct CadetConnection *c, struct CadetPeer *peer) |
3068 | { | 3068 | { |
3069 | struct CadetFlowControl *fc; | 3069 | struct CadetFlowControl *fc; |
3070 | struct CadetPeer *hop; | ||
3071 | char peer_name[16]; | 3070 | char peer_name[16]; |
3072 | int fwd; | 3071 | int fwd; |
3073 | 3072 | ||
@@ -3080,14 +3079,12 @@ GCC_neighbor_disconnected (struct CadetConnection *c, struct CadetPeer *peer) | |||
3080 | 3079 | ||
3081 | invalidate_paths (c, peer); | 3080 | invalidate_paths (c, peer); |
3082 | 3081 | ||
3083 | hop = get_prev_hop (c); | 3082 | fwd = is_fwd (c, peer); |
3084 | if (NULL == hop) | 3083 | if (GNUNET_SYSERR == fwd) |
3085 | { | 3084 | { |
3086 | /* Path was NULL, we should have deleted the connection. */ | ||
3087 | GNUNET_break (0); | 3085 | GNUNET_break (0); |
3088 | return; | 3086 | return; |
3089 | } | 3087 | } |
3090 | fwd = (peer == hop); | ||
3091 | if ( (GNUNET_YES == GCC_is_terminal (c, fwd)) || | 3088 | if ( (GNUNET_YES == GCC_is_terminal (c, fwd)) || |
3092 | (GNUNET_NO != c->destroy) ) | 3089 | (GNUNET_NO != c->destroy) ) |
3093 | { | 3090 | { |