/*
- * $Id: cache_cf.cc,v 1.81 1996/09/03 19:24:01 wessels Exp $
+ * $Id: cache_cf.cc,v 1.82 1996/09/04 23:42:01 wessels Exp $
*
* DEBUG: section 3 Configuration File Parsing
* AUTHOR: Harvest Derived
return 0;
}
-int setCacheSwapMax(size)
- int size;
-{
- Config.Swap.maxSize = size;
- return Config.Swap.maxSize;
-}
u_short setHttpPortNum(port)
u_short port;
{
getMyHostname(), Config.Port.http);
if (Config.errHtmlText == NULL)
Config.errHtmlText = xstrdup("");
+ storeConfigure();
}
/*
- * $Id: store.cc,v 1.96 1996/09/04 22:50:15 wessels Exp $
+ * $Id: store.cc,v 1.97 1996/09/04 23:42:02 wessels Exp $
*
* DEBUG: section 20 Storeage Manager
* AUTHOR: Harvest Derived
}
if (flag == DISK_NO_SPACE_LEFT) {
/* reduce the swap_size limit to the current size. */
- setCacheSwapMax(store_swap_size);
- store_swap_high = (long) (((float) Config.Swap.maxSize *
- (float) Config.Swap.highWaterMark) / (float) 100);
- store_swap_low = (long) (((float) Config.Swap.maxSize *
- (float) Config.Swap.lowWaterMark) / (float) 100);
+ Config.Swap.maxSize = store_swap_size;
+ storeConfigure();
}
return;
}
}
}
-int storeInit()
+void storeInit()
{
int dir_created;
wordlist *w = NULL;
if (dir_created || opt_zap_disk_store)
storeCreateSwapSubDirs();
+}
+void storeConfigure()
+{
store_mem_high = (long) (Config.Mem.maxSize / 100) *
Config.Mem.highWaterMark;
store_mem_low = (long) (Config.Mem.maxSize / 100) *
if (store_hotobj_low > store_hotobj_high)
store_hotobj_low = store_hotobj_high;
- store_swap_high = (long) (Config.Swap.maxSize / 100) *
- Config.Swap.highWaterMark;
- store_swap_low = (long) (Config.Swap.maxSize / 100) *
- Config.Swap.lowWaterMark;
-
- return 0;
+ store_swap_high = (long) (((float) Config.Swap.maxSize *
+ (float) Config.Swap.highWaterMark) / (float) 100);
+ store_swap_low = (long) (((float) Config.Swap.maxSize *
+ (float) Config.Swap.lowWaterMark) / (float) 100);
}
/*