]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
StoreIOState updates for COSS
authorwessels <>
Tue, 23 May 2006 06:39:32 +0000 (06:39 +0000)
committerwessels <>
Tue, 23 May 2006 06:39:32 +0000 (06:39 +0000)
src/fs/coss/CossSwapDir.h
src/fs/coss/store_dir_coss.cc
src/fs/coss/store_io_coss.cc

index 21e847b15293f5288f40a6638394223d9ee950c4..fdbda43fc5f7fd2e3e11db852697cafff7f620f9 100644 (file)
@@ -42,8 +42,8 @@ public:
     virtual int canStore(StoreEntry const &)const;
     virtual int callback();
     virtual void sync();
-    virtual StoreIOState::Pointer createStoreIO(StoreEntry &, STFNCB *, STIOCB *, void *);
-    virtual StoreIOState::Pointer openStoreIO(StoreEntry &, STFNCB *, STIOCB *, void *);
+    virtual StoreIOState::Pointer createStoreIO(StoreEntry &, StoreIOState::STFNCB *, StoreIOState::STIOCB *, void *);
+    virtual StoreIOState::Pointer openStoreIO(StoreEntry &, StoreIOState::STFNCB *, StoreIOState::STIOCB *, void *);
     virtual void openLog();
     virtual void closeLog();
     virtual int writeCleanStart();
index b97a06746ecec16aa4805bd4f914e4ef857f728f..a59a4b7b935ce240b0063caba01d370716dc6c85 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_dir_coss.cc,v 1.62 2006/05/19 20:22:56 wessels Exp $
+ * $Id: store_dir_coss.cc,v 1.63 2006/05/23 00:39:32 wessels Exp $
  * vim: set et : 
  *
  * DEBUG: section 47    Store COSS Directory Routines
@@ -182,7 +182,7 @@ CossSwapDir::readCompleted(const char *buf, int len, int errflag, RefCount<ReadR
     assert (cossRead);
     StoreIOState::Pointer sio =  cossRead->sio;
     void *cbdata;
-    STRCB *callback = sio->read.callback;
+    StoreIOState::STRCB *callback = sio->read.callback;
     char *p;
     CossState *cstate = dynamic_cast<CossState *>(sio.getRaw());
     ssize_t rlen;
@@ -222,7 +222,7 @@ CossSwapDir::readCompleted(const char *buf, int len, int errflag, RefCount<ReadR
     sio->read.callback = NULL;
 
     if (cbdataReferenceValidDone(sio->read.callback_data, &cbdata))
-        callback(cbdata, cstate->requestbuf, rlen);
+        callback(cbdata, cstate->requestbuf, rlen, sio);
 }
 
 void
index 9ee80a2e21a84d6cfe7c4fc2cbfcbd7ff78b2c9a..2eb0e8f982ebd30554ce324fa3eac20a20d78160 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_io_coss.cc,v 1.28 2006/05/23 00:17:47 wessels Exp $
+ * $Id: store_io_coss.cc,v 1.29 2006/05/23 00:39:32 wessels Exp $
  *
  * DEBUG: section 79    Storage Manager COSS Interface
  * AUTHOR: Eric Stern
@@ -141,7 +141,7 @@ CossSwapDir::unlink(StoreEntry & e)
 }
 
 StoreIOState::Pointer
-CossSwapDir::createStoreIO(StoreEntry &e, STFNCB * file_callback, STIOCB * callback, void *callback_data)
+CossSwapDir::createStoreIO(StoreEntry &e, StoreIOState::STFNCB * file_callback, StoreIOState::STIOCB * callback, void *callback_data)
 {
     CossState *cstate;
     StoreIOState::Pointer sio = new CossState(this);
@@ -189,8 +189,8 @@ CossSwapDir::createStoreIO(StoreEntry &e, STFNCB * file_callback, STIOCB * callb
 }
 
 StoreIOState::Pointer
-CossSwapDir::openStoreIO(StoreEntry & e, STFNCB * file_callback,
-                         STIOCB * callback, void *callback_data)
+CossSwapDir::openStoreIO(StoreEntry & e, StoreIOState::STFNCB * file_callback,
+                         StoreIOState::STIOCB * callback, void *callback_data)
 {
     char *p;
     CossState *cstate;
@@ -249,7 +249,7 @@ CossSwapDir::openStoreIO(StoreEntry & e, STFNCB * file_callback,
         }
 
         /* Notify the upper levels that we've changed file number */
-        sio->file_callback(sio->callback_data, 0);
+        sio->file_callback(sio->callback_data, 0, sio);
 
         /*
          * lock the buffer so it doesn't get swapped out on us
@@ -427,7 +427,7 @@ CossState::doCallback(int errflag)
     this->callback = NULL;
 
     if (cbdataReferenceValidDone(callback_data, &cbdata))
-        callback(cbdata, errflag);
+        callback(cbdata, errflag, this);
 }
 
 char *