]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Henrik's fixes for DW adding FD to AIOCB bugs
authorwessels <>
Tue, 25 Aug 1998 04:06:44 +0000 (04:06 +0000)
committerwessels <>
Tue, 25 Aug 1998 04:06:44 +0000 (04:06 +0000)
src/disk.cc
src/protos.h
src/store_rebuild.cc
src/tools.cc

index d1229ebbe6d621a3f2951ed6041e4a14f5872cb2..237dc7358c05a6d92bb4f3a83ceaf328b6dacae0 100644 (file)
@@ -1,7 +1,7 @@
 
 
 /*
- * $Id: disk.cc,v 1.132 1998/08/21 09:15:22 wessels Exp $
+ * $Id: disk.cc,v 1.133 1998/08/24 22:06:44 wessels Exp $
  *
  * DEBUG: section 6     Disk I/O Routines
  * AUTHOR: Harvest Derived
@@ -214,7 +214,9 @@ diskCombineWrites(struct _fde_disk *fdd)
 static void
 diskHandleWrite(int fd, void *notused)
 {
+#if !USE_ASYNC_IO
     int len = 0;
+#endif
     fde *F = &fd_table[fd];
     struct _fde_disk *fdd = &F->disk;
     if (!fdd->write_q)
@@ -238,7 +240,7 @@ diskHandleWrite(int fd, void *notused)
     len = write(fd,
        fdd->write_q->buf + fdd->write_q->buf_offset,
        fdd->write_q->len - fdd->write_q->buf_offset);
-    diskHandleWriteComplete(fd, NULL, len, errno);
+    diskHandleWriteComplete(fd, fdd->write_q, len, errno);
 #endif
 }
 
@@ -275,7 +277,6 @@ diskHandleWriteComplete(int fd, void *data, int len, int errcode)
        errcode = EFAULT;
     }
 #endif
-    safe_free(data);
     if (q == NULL)             /* Someone aborted then write completed */
        return;
 
index 6714efde85e942862f64c902bc888f31f1634f02..5be079b437d967554222a4721662ced977e2bfd9 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: protos.h,v 1.253 1998/08/21 03:15:22 wessels Exp $
+ * $Id: protos.h,v 1.254 1998/08/24 22:06:46 wessels Exp $
  *
  *
  * SQUID Internet Object Cache  http://squid.nlanr.net/Squid/
@@ -869,7 +869,6 @@ extern void storeSwapTLVFree(tlv * n);
  */
 extern void storeDoRebuildFromSwapFiles(void *data);
 extern void storeValidate(StoreEntry *, STVLDCB *, void *, void *);
-extern void storeValidateComplete(void *data, int retcode, int errcode);
 extern void storeRebuildStart(void);
 
 /*
index e4552965563c35865391ce0dd709d31d2a256024..9e20fc52653c085bfc8d0c26c55cb51cbf9e2043 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: store_rebuild.cc,v 1.45 1998/08/05 08:19:56 wessels Exp $
+ * $Id: store_rebuild.cc,v 1.46 1998/08/24 22:06:48 wessels Exp $
  *
  * DEBUG: section 20    Store Rebuild Routines
  * AUTHOR: Duane Wessels
@@ -100,6 +100,7 @@ static StoreEntry *storeAddDiskRestore(const cache_key * key,
     u_num32 refcount,
     u_num32 flags,
     int clean);
+static AIOCB storeValidateComplete;
 
 static int
 storeRebuildFromDirectory(rebuild_dir * d)
@@ -665,13 +666,13 @@ storeValidate(StoreEntry * e, STVLDCB * callback, void *callback_data, void *tag
      * not specified;
      */
     x = stat(path, sb);
-    storeValidateComplete(ctrlp, x, errno);
+    storeValidateComplete(-1, ctrlp, x, errno);
 #endif
     return;
 }
 
 void
-storeValidateComplete(void *data, int retcode, int errcode)
+storeValidateComplete(int fd, void *data, int retcode, int errcode)
 {
     valid_ctrl_t *ctrlp = data;
     struct stat *sb = ctrlp->sb;
index 627fb6373c8230171628c87130fa684731ca1d5f..647655fabfc1d9490f1ab90760bf17ed26a5bf2d 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: tools.cc,v 1.166 1998/07/25 04:47:29 wessels Exp $
+ * $Id: tools.cc,v 1.167 1998/08/24 22:06:49 wessels Exp $
  *
  * DEBUG: section 21    Misc Functions
  * AUTHOR: Harvest Derived
@@ -49,7 +49,7 @@ static void fatal_common(const char *);
 static void fatalvf(const char *fmt, va_list args);
 static void mail_warranty(void);
 #if USE_ASYNC_IO
-static void safeunlinkComplete(void *data, int retcode, int errcode);
+static AIOCB safeunlinkComplete;
 #endif
 #if MEM_GEN_TRACE
 extern void log_trace_done();
@@ -446,7 +446,7 @@ safeunlink(const char *s, int quiet)
 
 #if USE_ASYNC_IO
 static void
-safeunlinkComplete(void *data, int retcode, int errcode)
+safeunlinkComplete(int fd, void *data, int retcode, int errcode)
 {
     char *s = data;
     if (retcode < 0) {