]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Changed storeAbort() into StoreEntry::abort()
authorwessels <>
Sat, 21 Apr 2007 05:10:59 +0000 (05:10 +0000)
committerwessels <>
Sat, 21 Apr 2007 05:10:59 +0000 (05:10 +0000)
src/Store.h
src/store.cc
src/store_client.cc
src/store_swapout.cc

index c913a6e3e16df4a074105c02d62bdb54d4db47ca..6dd33b486ef215c122e79137240bc1460f7e933c 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: Store.h,v 1.30 2007/04/20 06:54:48 wessels Exp $
+ * $Id: Store.h,v 1.31 2007/04/20 23:10:59 wessels Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -80,6 +80,7 @@ public:
     virtual void replaceHttpReply(HttpReply *);
     virtual bool swapoutPossible();
     virtual void trimMemory();
+    void abort();
     void unlink();
     void makePublic();
     void makePrivate();
@@ -288,7 +289,6 @@ SQUIDCEXTERN void storeSetPublicKey(StoreEntry *);
 SQUIDCEXTERN void storeCreateMemObject(StoreEntry *, const char *, const char *);
 SQUIDCEXTERN void storeInit(void);
 extern void storeRegisterWithCacheManager(CacheManager & manager);
-SQUIDCEXTERN void storeAbort(StoreEntry *);
 SQUIDCEXTERN void storeAppend(StoreEntry *, const char *, int);
 SQUIDCEXTERN void storeExpireNow(StoreEntry *);
 SQUIDCEXTERN void storeReleaseRequest(StoreEntry *);
index 1636fac7501abf48c0119f15e90bc9146d8b2e6e..a24ceb3a2345d610ee573f8444f3b54e15762db0 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store.cc,v 1.606 2007/04/17 23:05:17 wessels Exp $
+ * $Id: store.cc,v 1.607 2007/04/20 23:10:59 wessels Exp $
  *
  * DEBUG: section 20    Storage Manager
  * AUTHOR: Harvest Derived
@@ -1113,26 +1113,25 @@ StoreEntry::complete()
  * entry for releasing
  */
 void
-storeAbort(StoreEntry * e)
+StoreEntry::abort()
 {
     statCounter.aborted_requests++;
-    MemObject *mem = e->mem_obj;
-    assert(e->store_status == STORE_PENDING);
-    assert(mem != NULL);
-    debug(20, 6) ("storeAbort: %s\n", e->getMD5Text());
+    assert(store_status == STORE_PENDING);
+    assert(mem_obj != NULL);
+    debug(20, 6) ("storeAbort: %s\n", getMD5Text());
 
-    e->lock()
+    lock()
 
     ;         /* lock while aborting */
-    storeNegativeCache(e);
+    storeNegativeCache(this);
 
-    storeReleaseRequest(e);
+    storeReleaseRequest(this);
 
-    EBIT_SET(e->flags, ENTRY_ABORTED);
+    EBIT_SET(flags, ENTRY_ABORTED);
 
-    storeSetMemStatus(e, NOT_IN_MEMORY);
+    storeSetMemStatus(this, NOT_IN_MEMORY);
 
-    e->store_status = STORE_OK;
+    store_status = STORE_OK;
 
     /*
      * We assign an object length here.  The only other place we assign
@@ -1142,30 +1141,30 @@ storeAbort(StoreEntry * e)
      * request, the request is private and negatively cached. Surely
      * the object length is inappropriate to set.
      */
-    mem->object_sz = mem->endOffset();
+    mem_obj->object_sz = mem_obj->endOffset();
 
     /* Notify the server side */
 
-    if (mem->abort.callback) {
-        eventAdd("mem->abort.callback",
-                 mem->abort.callback,
-                 mem->abort.data,
+    if (mem_obj->abort.callback) {
+        eventAdd("mem_obj->abort.callback",
+                 mem_obj->abort.callback,
+                 mem_obj->abort.data,
                  0.0,
                  0);
-        mem->abort.callback = NULL;
-        mem->abort.data = NULL;
+        mem_obj->abort.callback = NULL;
+        mem_obj->abort.data = NULL;
     }
 
     /* XXX Should we reverse these two, so that there is no
      * unneeded disk swapping triggered? 
      */
     /* Notify the client side */
-    InvokeHandlers(e);
+    InvokeHandlers(this);
 
     /* Close any swapout file */
-    e->swapOutFileClose();
+    swapOutFileClose();
 
-    e->unlock();       /* unlock */
+    unlock();       /* unlock */
 }
 
 /* Clear Memory storage to accommodate the given object len */
index f38dc0a0aab85dc71ccd856d3a9f64490a2deb09..f9366a000f1110cbf7d4fff386d5836bcb91bff5 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_client.cc,v 1.152 2007/04/20 22:06:44 wessels Exp $
+ * $Id: store_client.cc,v 1.153 2007/04/20 23:10:59 wessels Exp $
  *
  * DEBUG: section 90    Storage Manager Client-Side Interface
  * AUTHOR: Duane Wessels
@@ -819,7 +819,7 @@ CheckQuickAbort(StoreEntry * entry)
     if (CheckQuickAbort2(entry) == 0)
         return;
 
-    storeAbort(entry);
+    entry->abort();
 }
 
 void
index 8644477a84604e5fd71dc1deddfb578c233ff163..9631ceec30f7519ba6a6892c4a6e067a2d125db7 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_swapout.cc,v 1.112 2007/04/20 22:06:44 wessels Exp $
+ * $Id: store_swapout.cc,v 1.113 2007/04/20 23:10:59 wessels Exp $
  *
  * DEBUG: section 20    Storage Manager Swapout Functions
  * AUTHOR: Duane Wessels
@@ -235,7 +235,7 @@ StoreEntry::swapOut()
 
     if (mem_obj->endOffset() > 0x7FFF0000) {
         debug(20, 0) ("WARNING: preventing off_t overflow for %s\n", storeUrl(this));
-        storeAbort(this);
+        abort();
         return;
     }