violat
authorChristian Grothoff <christian@grothoff.org>
Thu, 25 Mar 2010 14:53:00 +0000 (14:53 +0000)
committerChristian Grothoff <christian@grothoff.org>
Thu, 25 Mar 2010 14:53:00 +0000 (14:53 +0000)
src/include/gnunet_constants.h
src/transport/gnunet-service-transport.c

index 3b56f26d66b3db872aef1962cd1d37f3f433d512..bfb36a2ea1036d86c0f773780a24c1919714aa0a 100644 (file)
@@ -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.)?
index 84f9395780d00dc7f290d62c7d259c8224540641..7c2c0eadd922329b9c56029aa886877cf9d124bd 100644 (file)
@@ -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))
        {