From: Christian Grothoff Date: Thu, 25 Mar 2010 14:53:00 +0000 (+0000) Subject: violat X-Git-Tag: initial-import-from-subversion-38251~22368 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=6fab9d7757ed01d3ae98404c73ed98d80c235d9d;p=oweals%2Fgnunet.git violat --- 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)) {