From: Francesco Chemolli Date: Wed, 29 Aug 2012 16:26:55 +0000 (+0200) Subject: Moved store_digest-related prototypes to newly-created store_digest.h X-Git-Tag: sourceformat-review-1~48 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=35a28a37f9947291d8ebebfda402d7f7b7b85bf4;p=thirdparty%2Fsquid.git Moved store_digest-related prototypes to newly-created store_digest.h --- diff --git a/src/Makefile.am b/src/Makefile.am index e1e2071f33..3ef53fd537 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -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 \ diff --git a/src/protos.h b/src/protos.h index bea93fb13a..f004733cec 100644 --- a/src/protos.h +++ b/src/protos.h @@ -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 */ diff --git a/src/stat.cc b/src/stat.cc index 80a7ecdf0a..67a0cbf1b0 100644 --- a/src/stat.cc +++ b/src/stat.cc @@ -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 diff --git a/src/store.cc b/src/store.cc index 6d6845a6a4..7e1ace430c 100644 --- a/src/store.cc +++ b/src/store.cc @@ -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" diff --git a/src/store_digest.cc b/src/store_digest.cc index be2965f55a..8b39baa6cb 100644 --- a/src/store_digest.cc +++ b/src/store_digest.cc @@ -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 index 0000000000..73deb856c3 --- /dev/null +++ b/src/store_digest.h @@ -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_ */ diff --git a/src/store_rebuild.cc b/src/store_rebuild.cc index f7d9bdd9fb..1818a0b2b2 100644 --- a/src/store_rebuild.cc +++ b/src/store_rebuild.cc @@ -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"