From 6fab9d7757ed01d3ae98404c73ed98d80c235d9d Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 25 Mar 2010 14:53:00 +0000 Subject: [PATCH] violat --- src/include/gnunet_constants.h | 5 +++++ src/transport/gnunet-service-transport.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/include/gnunet_constants.h b/src/include/gnunet_constants.h index 3b56f26d6..bfb36a2ea 100644 --- a/src/include/gnunet_constants.h +++ b/src/include/gnunet_constants.h @@ -51,6 +51,11 @@ extern "C" */ #define GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 5) +/** + * How long do we delay reading more from a peer after a quota violation? + */ +#define GNUNET_CONSTANTS_QUOTA_VIOLATION_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 2) + /** * How long do we wait after a FORK+EXEC before testing for the * resulting process to be up (port open, waitpid, etc.)? diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c index 84f939578..7c2c0eadd 100644 --- a/src/transport/gnunet-service-transport.c +++ b/src/transport/gnunet-service-transport.c @@ -3147,7 +3147,7 @@ plugin_env_receive (void *cls, const struct GNUNET_PeerIdentity *peer, gettext_noop ("# bandwidth quota violations by other peers"), 1, GNUNET_NO); - return GNUNET_TIME_UNIT_MINUTES; /* minimum penalty, likely ignored (UDP...) */ + return GNUNET_CONSTANTS_QUOTA_VIOLATION_TIMEOUT; } switch (ntohs (message->type)) { -- 2.25.1