]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Moved store_digest-related prototypes to newly-created store_digest.h
authorFrancesco Chemolli <kinkie@squid-cache.org>
Wed, 29 Aug 2012 16:26:55 +0000 (18:26 +0200)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Wed, 29 Aug 2012 16:26:55 +0000 (18:26 +0200)
src/Makefile.am
src/protos.h
src/stat.cc
src/store.cc
src/store_digest.cc
src/store_digest.h [new file with mode: 0644]
src/store_rebuild.cc

index e1e2071f3362cba8d8b5804cd78d3c87449480e4..3ef53fd537503edc360d5aba0b90239404db12f3 100644 (file)
@@ -473,6 +473,7 @@ squid_SOURCES = \
        StoreIOState.h \
        store_client.cc \
        StoreClient.h \
+       store_digest.h \
        store_digest.cc \
        store_dir.cc \
        store_key_md5.h \
@@ -1468,6 +1469,7 @@ tests_testCacheManager_SOURCES = \
        repl_modules.h \
        store.cc \
        store_client.cc \
+       store_digest.h \
        store_digest.cc \
        store_dir.cc \
        store_io.cc \
@@ -1850,6 +1852,7 @@ tests_testEvent_SOURCES = \
        repl_modules.h \
        store.cc \
        store_client.cc \
+       store_digest.h \
        store_digest.cc \
        store_dir.cc \
        store_io.cc \
@@ -2074,6 +2077,7 @@ tests_testEventLoop_SOURCES = \
        repl_modules.h \
        store.cc \
        store_client.cc \
+       store_digest.h \
        store_digest.cc \
        store_dir.cc \
        store_io.cc \
@@ -2295,6 +2299,7 @@ tests_test_http_range_SOURCES = \
        repl_modules.h \
        store.cc \
        store_client.cc \
+       store_digest.h \
        store_digest.cc \
        store_dir.cc \
        store_key_md5.h \
@@ -2559,6 +2564,7 @@ tests_testHttpRequest_SOURCES = \
        repl_modules.h \
        store.cc \
        store_client.cc \
+       store_digest.h \
        store_digest.cc \
        store_dir.cc \
        store_io.cc \
@@ -3586,6 +3592,7 @@ tests_testURL_SOURCES = \
        repl_modules.h \
        store.cc \
        store_client.cc \
+       store_digest.h \
        store_digest.cc \
        store_dir.cc \
        store_io.cc \
index bea93fb13a6f78d92f41322a292250550a0a1589..f004733cecd58cf18dedcd3f3a2403a613bb1604 100644 (file)
@@ -86,15 +86,6 @@ extern void shut_down(int);
 extern void rotate_logs(int);
 extern void reconfigure(int);
 
-/*
- * store_digest.c
- */
-extern void storeDigestInit(void);
-extern void storeDigestNoteStoreReady(void);
-extern void storeDigestScheduleRebuild(void);
-extern void storeDigestDel(const StoreEntry * entry);
-extern void storeDigestReport(StoreEntry *);
-
 /*
  * store_rebuild.c
  */
index 80a7ecdf0ab664fab4a0689d9ec54871f34393ee..67a0cbf1b0466c234a88996f3aa8733efb0fcd30 100644 (file)
@@ -62,6 +62,7 @@
 #include "stat.h"
 #include "StoreClient.h"
 #include "Store.h"
+#include "store_digest.h"
 #if USE_AUTH
 #include "auth/UserRequest.h"
 #endif
index 6d6845a6a4a2c3a901448553dfc16ccebb23438e..7e1ace430cf7874be31d2551d3616c0af70d4032 100644 (file)
@@ -60,6 +60,7 @@
 #include "StoreIOState.h"
 #include "StoreMeta.h"
 #include "StrList.h"
+#include "store_digest.h"
 #include "store_key_md5.h"
 #include "store_log.h"
 #include "SwapDir.h"
index be2965f55ad05442e5aa11cdabd4e3cc47867de0..8b39baa6cb16e8d6dd8a2ddcb6afdc9e1618d920 100644 (file)
@@ -1,7 +1,4 @@
-
 /*
- * $Id$
- *
  * DEBUG: section 71    Store Digest Manager
  * AUTHOR: Alex Rousskov
  *
@@ -44,6 +41,7 @@
 #include "event.h"
 #include "globals.h"
 #include "mgr/Registration.h"
+#include "store_digest.h"
 #include "protos.h"
 
 #if USE_CACHE_DIGESTS
@@ -139,7 +137,6 @@ storeDigestInit(void)
 
     memset(&sd_state, 0, sizeof(sd_state));
 #else
-
     store_digest = NULL;
     debugs(71, 3, "Local cache digest is 'off'");
 #endif
@@ -159,6 +156,7 @@ storeDigestNoteStoreReady(void)
 #endif
 }
 
+//TODO: this seems to be dead code. Is it needed?
 void
 storeDigestDel(const StoreEntry * entry)
 {
@@ -181,8 +179,7 @@ storeDigestDel(const StoreEntry * entry)
             debugs(71, 6, "storeDigestDel: deled entry, key: " << entry->getMD5Text());
         }
     }
-
-#endif
+#endif //USE_CACHE_DIGESTS
 }
 
 void
@@ -208,7 +205,7 @@ storeDigestReport(StoreEntry * e)
         storeAppendPrintf(e, "store digest: disabled.\n");
     }
 
-#endif
+#endif //USE_CACHE_DIGESTS
 }
 
 /*
diff --git a/src/store_digest.h b/src/store_digest.h
new file mode 100644 (file)
index 0000000..73deb85
--- /dev/null
@@ -0,0 +1,42 @@
+#ifndef SQUID_STORE_DIGEST_H_
+#define SQUID_STORE_DIGEST_H_
+/*
+ * DEBUG: section 71    Store Digest Manager
+ * AUTHOR: Alex Rousskov
+ *
+ * SQUID Web Proxy Cache          http://www.squid-cache.org/
+ * ----------------------------------------------------------
+ *
+ *  Squid is the result of efforts by numerous individuals from
+ *  the Internet community; see the CONTRIBUTORS file for full
+ *  details.   Many organizations have provided support for Squid's
+ *  development; see the SPONSORS file for full details.  Squid is
+ *  Copyrighted (C) 2001 by the Regents of the University of
+ *  California; see the COPYRIGHT file for full details.  Squid
+ *  incorporates software developed and/or copyrighted by other
+ *  sources; see the CREDITS file for full details.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
+ *
+ */
+
+class StoreEntry;
+
+extern void storeDigestInit(void);
+extern void storeDigestNoteStoreReady(void);
+extern void storeDigestDel(const StoreEntry * entry);
+extern void storeDigestReport(StoreEntry *);
+
+#endif /* SQUID_STORE_DIGEST_H_ */
index f7d9bdd9fbbe77b674eedd76567626efd8776ba2..1818a0b2b2735cbb3035577056b45aa3480f474c 100644 (file)
@@ -42,6 +42,7 @@
 #include "Store.h"
 #include "store_key_md5.h"
 #include "SwapDir.h"
+#include "store_digest.h"
 #include "StoreSearch.h"
 #include "SquidTime.h"