diff options
author | Bart Polot <bart@net.in.tum.de> | 2014-07-30 08:21:49 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2014-07-30 08:21:49 +0000 |
commit | 292ab01156b6635d80fcb3fd4fd20bc702db1d3d (patch) | |
tree | 97835ec8e35d65424d12d3d597b6fb6cd2b5a92a /src/cadet/gnunet-service-cadet_channel.c | |
parent | 19ae453f6ff039e8b30fc2d210562931544a8bd9 (diff) | |
download | gnunet-292ab01156b6635d80fcb3fd4fd20bc702db1d3d.tar.gz gnunet-292ab01156b6635d80fcb3fd4fd20bc702db1d3d.zip |
- better feedback to users about duplicated messages
Diffstat (limited to 'src/cadet/gnunet-service-cadet_channel.c')
-rw-r--r-- | src/cadet/gnunet-service-cadet_channel.c | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/src/cadet/gnunet-service-cadet_channel.c b/src/cadet/gnunet-service-cadet_channel.c index 3dc7101d4..cc809e9d0 100644 --- a/src/cadet/gnunet-service-cadet_channel.c +++ b/src/cadet/gnunet-service-cadet_channel.c | |||
@@ -1972,10 +1972,26 @@ GCCH_handle_data (struct CadetChannel *ch, | |||
1972 | } | 1972 | } |
1973 | else | 1973 | else |
1974 | { | 1974 | { |
1975 | GNUNET_break_op (GC_is_pid_bigger (rel->mid_recv, mid)); | 1975 | if (GC_is_pid_bigger (rel->mid_recv, mid)) |
1976 | LOG (GNUNET_ERROR_TYPE_WARNING, | 1976 | { |
1977 | "MID %u on channel %s not expected (window: %u - %u). Dropping!\n", | 1977 | GNUNET_break_op (0); |
1978 | mid, GCCH_2s (ch), rel->mid_recv, rel->mid_recv + 63); | 1978 | LOG (GNUNET_ERROR_TYPE_WARNING, |
1979 | "MID %u on channel %s not expected (window: %u - %u). Dropping!\n", | ||
1980 | mid, GCCH_2s (ch), rel->mid_recv, rel->mid_recv + 63); | ||
1981 | } | ||
1982 | else | ||
1983 | { | ||
1984 | LOG (GNUNET_ERROR_TYPE_WARNING, | ||
1985 | "Duplicate MID %u, channel %s (expecting MID %u). Re-sending ACK!\n", | ||
1986 | mid, GCCH_2s (ch), rel->mid_recv); | ||
1987 | if (NULL != rel->uniq) | ||
1988 | { | ||
1989 | LOG (GNUNET_ERROR_TYPE_WARNING, | ||
1990 | "We are trying to send an ACK, but don't seem have the " | ||
1991 | "bandwidth. Try to increase your ats QUOTA in you config file\n"); | ||
1992 | } | ||
1993 | |||
1994 | } | ||
1979 | } | 1995 | } |
1980 | 1996 | ||
1981 | GCCH_send_data_ack (ch, fwd); | 1997 | GCCH_send_data_ack (ch, fwd); |