a1708067edcd7dbca14b244587c416afaf041114
jcasper
  Mon Apr 10 16:47:31 2017 -0700
DAS server can now contact a bottleneck server to moderate usage, refs #19193

diff --git src/hg/lib/botDelay.c src/hg/lib/botDelay.c
index ce57006..82921fd 100644
--- src/hg/lib/botDelay.c
+++ src/hg/lib/botDelay.c
@@ -170,31 +170,36 @@
 }
 
 void hgBotDelayNoWarn()
 /* High level bot delay call without warning - for use with non-webpage outputs */
 {
 hgBotDelayExt(TRUE, 1.0);
 }
 
 void hgBotDelayNoWarnFrac(double fraction)
 /* Like hgBotDelayNoWarn, but imposes a fraction of the standard access penalty */
 {
 hgBotDelayExt(TRUE, fraction);
 }
 
 int hgBotDelayTime()
+{
+return hgBotDelayTimeFrac(1.0);
+}
+
+int hgBotDelayTimeFrac(double fraction)
 /* Get suggested delay time from cgi using the standard penalty. */
 {
 char *ip = getenv("REMOTE_ADDR");
 char *host = cfgOption("bottleneck.host");
 char *port = cfgOption("bottleneck.port");
 
 int delay = 0;
 if (host != NULL && port != NULL && ip != NULL)
     {
-    char *botCheckString = getBotCheckString(ip, 1.0);    
+    char *botCheckString = getBotCheckString(ip, fraction);
     delay = botDelayTime(host, atoi(port), botCheckString);
     freeMem(botCheckString);
     }
 return delay;
 }