]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
- Added storeConfigure() so HUP signal affects store_swap size.
authorwessels <>
Thu, 5 Sep 1996 05:42:01 +0000 (05:42 +0000)
committerwessels <>
Thu, 5 Sep 1996 05:42:01 +0000 (05:42 +0000)
src/cache_cf.cc
src/store.cc

index d849b508195e7eaf21eeb976b31473e284835be3..eb3816c5d4b079f12e60d9769dd91839d718d252 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $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
@@ -1411,12 +1411,6 @@ int parseConfigFile(file_name)
     return 0;
 }
 
-int setCacheSwapMax(size)
-     int size;
-{
-    Config.Swap.maxSize = size;
-    return Config.Swap.maxSize;
-}
 u_short setHttpPortNum(port)
      u_short port;
 {
@@ -1564,4 +1558,5 @@ static void configDoConfigure()
        getMyHostname(), Config.Port.http);
     if (Config.errHtmlText == NULL)
        Config.errHtmlText = xstrdup("");
+    storeConfigure();
 }
index 8bb3297520bcb6fc8e0fbde3a0093427af08c22e..abe8e3b5ba455c513af4cb3e4e58eff1e5dd5882 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $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
@@ -1272,11 +1272,8 @@ void storeSwapOutHandle(fd, flag, e)
        }
        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;
     }
@@ -2518,7 +2515,7 @@ static void storeCreateSwapSubDirs()
     }
 }
 
-int storeInit()
+void storeInit()
 {
     int dir_created;
     wordlist *w = NULL;
@@ -2555,7 +2552,10 @@ int storeInit()
 
     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) *
@@ -2578,12 +2578,10 @@ int storeInit()
     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);
 }
 
 /*