[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r2443 - GNUnet/src/applications/gap
From: |
durner |
Subject: |
[GNUnet-SVN] r2443 - GNUnet/src/applications/gap |
Date: |
Tue, 10 Jan 2006 05:28:39 -0800 (PST) |
Author: durner
Date: 2006-01-10 05:28:35 -0800 (Tue, 10 Jan 2006)
New Revision: 2443
Modified:
GNUnet/src/applications/gap/gap.c
Log:
Hard limit II
Modified: GNUnet/src/applications/gap/gap.c
===================================================================
--- GNUnet/src/applications/gap/gap.c 2006-01-10 10:41:13 UTC (rev 2442)
+++ GNUnet/src/applications/gap/gap.c 2006-01-10 13:28:35 UTC (rev 2443)
@@ -2067,6 +2067,22 @@
BREAK();
return 0;
}
+
+ /* Load above hard limit? */
+ if ((hardCPULimit && getCPULoad() >= hardCPULimit) ||
+ (hardUpLimit && getNetworkLoadUp() >= hardUpLimit) ) {
+#if DEBUG_GAP
+ if (sender != NULL) {
+ IFLOG(LOG_DEBUG,
+ hash2enc(&sender->hashPubKey,
+ &enc));
+ }
+ LOG(LOG_DEBUG,
+ "Dropping query from %s, this peer is too busy.\n",
+ sender == NULL ? "localhost" : &enc);
+#endif
+ return OK;
+ }
queries = 1 + (ntohs(msg->size) - sizeof(P2P_gap_query_MESSAGE))
/ sizeof(HashCode512);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r2443 - GNUnet/src/applications/gap,
durner <=