From: wessels <> Date: Sun, 23 Nov 1997 13:48:39 +0000 (+0000) Subject: When reconfiguring, don't free the cacheSwap data structs, we can only X-Git-Tag: SQUID_3_0_PRE1~4484 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=860ee7e3b2316db7ab2c647eef04520259b5efcc;p=thirdparty%2Fsquid.git When reconfiguring, don't free the cacheSwap data structs, we can only change the size and the read/write flag. --- diff --git a/src/cache_cf.cc b/src/cache_cf.cc index 67184a65f7..dbad86fbcd 100644 --- a/src/cache_cf.cc +++ b/src/cache_cf.cc @@ -1,5 +1,5 @@ /* - * $Id: cache_cf.cc,v 1.233 1997/11/13 02:32:37 wessels Exp $ + * $Id: cache_cf.cc,v 1.234 1997/11/23 06:48:39 wessels Exp $ * * DEBUG: section 3 Configuration File Parsing * AUTHOR: Harvest Derived @@ -457,7 +457,16 @@ parse_cachedir(struct _cacheSwap *swap) tmp = swap->swapDirs + i; if (!strcmp(path, tmp->path)) { /* just reconfigure it */ + if (size == tmp->max_size) + debug(3,1)("Cache dir '%s' size remains unchanged at %d MB\n", + path, size); + else + debug(3,1)("Cache dir '%s' size changed to %d MB\n", + path, size); tmp->max_size = size; + if (tmp->read_only != readonly) + debug(3,1)("Cache dir '%s' now %s\n", + readonly ? "Read-Only" : "Read-Write"); tmp->read_only = readonly; return; } @@ -490,6 +499,9 @@ free_cachedir(struct _cacheSwap *swap) { SwapDir *s; int i; + /* DON'T FREE THESE FOR RECONFIGURE */ + if (reconfigure_pending) + return; for (i = 0; i < swap->n_configured; i++) { s = swap->swapDirs + i; if (s->swaplog_fd > -1) {