]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Argh, that last patch to src/store_dir.c is bogus. sd->log.clean.done
authorwessels <>
Tue, 5 Dec 2000 16:11:24 +0000 (16:11 +0000)
committerwessels <>
Tue, 5 Dec 2000 16:11:24 +0000 (16:11 +0000)
will never be NULL, it's sd->log.clean.state that's the problem.
Also, this way I get to fix it in four files, not just one.

src/fs/aufs/store_dir_aufs.cc
src/fs/coss/store_dir_coss.cc
src/fs/diskd/store_dir_diskd.cc
src/fs/ufs/store_dir_ufs.cc
src/store_dir.cc

index b5e27d5df4a696837adf4f69144bc768e81280c8..372f8e1780a6f568fcc0dbf31afb14ac0574db55 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_dir_aufs.cc,v 1.19 2000/11/30 20:12:46 wessels Exp $
+ * $Id: store_dir_aufs.cc,v 1.20 2000/12/05 09:11:30 wessels Exp $
  *
  * DEBUG: section 47    Store Directory Routines
  * AUTHOR: Duane Wessels
@@ -1051,6 +1051,8 @@ static void
 storeAufsDirWriteCleanDone(SwapDir * sd)
 {
     struct _clean_state *state = sd->log.clean.state;
+    if (NULL == state)
+       return;
     if (state->fd < 0)
        return;
     state->walker->Done(state->walker);
index 1c1943e950832ec8d75d5e10dce30847af10df2e..dc876ae987ac076aa9e010e76177cee69db31e75 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_dir_coss.cc,v 1.10 2000/11/30 20:08:50 wessels Exp $
+ * $Id: store_dir_coss.cc,v 1.11 2000/12/05 09:11:31 wessels Exp $
  *
  * DEBUG: section 81    Store COSS Directory Routines
  * AUTHOR: Eric Stern
@@ -551,6 +551,8 @@ static void
 storeCossDirWriteCleanDone(SwapDir * sd)
 {
     struct _clean_state *state = sd->log.clean.state;
+    if (NULL == state)
+       return;
     if (state->fd < 0)
        return;
     if (write(state->fd, state->outbuf, state->outbuf_offset) < 0) {
index c0b36eadba0f483905b92d5f25cac0cdf8950533..020dce40e443d42c3665b7d7681a29e2c8811e60 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_dir_diskd.cc,v 1.26 2000/11/30 20:08:50 wessels Exp $
+ * $Id: store_dir_diskd.cc,v 1.27 2000/12/05 09:11:31 wessels Exp $
  *
  * DEBUG: section 47    Store Directory Routines
  * AUTHOR: Duane Wessels
@@ -1245,6 +1245,8 @@ static void
 storeDiskdDirWriteCleanDone(SwapDir * sd)
 {
     struct _clean_state *state = sd->log.clean.state;
+    if (NULL == state)
+       return;
     if (state->fd < 0)
        return;
     state->walker->Done(state->walker);
index cf80edace6a3362ef39b4b63517d76131ad07f89..a7fd5ab9ad8413940a456b66cfc41e2d41b5161a 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_dir_ufs.cc,v 1.16 2000/11/30 20:08:51 wessels Exp $
+ * $Id: store_dir_ufs.cc,v 1.17 2000/12/05 09:11:34 wessels Exp $
  *
  * DEBUG: section 47    Store Directory Routines
  * AUTHOR: Duane Wessels
@@ -1049,6 +1049,8 @@ static void
 storeUfsDirWriteCleanDone(SwapDir * sd)
 {
     struct _clean_state *state = sd->log.clean.state;
+    if (NULL == state)
+       return;
     if (state->fd < 0)
        return;
     state->walker->Done(state->walker);
index b502b78e933cfec1eb07a102b867882ffd8a8573..0cce350b4a0f4ca5b19940ae5846635efd9b1b80 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_dir.cc,v 1.116 2000/12/05 09:03:31 wessels Exp $
+ * $Id: store_dir.cc,v 1.117 2000/12/05 09:11:24 wessels Exp $
  *
  * DEBUG: section 47    Store Directory Routines
  * AUTHOR: Duane Wessels
@@ -401,8 +401,7 @@ storeDirWriteCleanLogs(int reopen)
     /* Flush */
     for (dirn = 0; dirn < Config.cacheSwap.n_configured; dirn++) {
        sd = &Config.cacheSwap.swapDirs[dirn];
-       if (sd->log.clean.done)
-           sd->log.clean.done(sd);
+       sd->log.clean.done(sd);
     }
     if (reopen)
        storeDirOpenSwapLogs();