From: serassio <> Date: Sun, 2 Mar 2008 22:54:48 +0000 (+0000) Subject: Windows port: Add reconfigure action to cachemgr. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f9ca0f92a1ba10bfd2d8bfd05d04c8e5aabb3210;p=thirdparty%2Fsquid.git Windows port: Add reconfigure action to cachemgr. --- diff --git a/src/cache_manager.cc b/src/cache_manager.cc index f8b07f7d45..a5e5807a30 100644 --- a/src/cache_manager.cc +++ b/src/cache_manager.cc @@ -1,6 +1,6 @@ /* - * $Id: cache_manager.cc,v 1.48 2007/10/31 04:52:16 amosjeffries Exp $ + * $Id: cache_manager.cc,v 1.48.4.1 2008/03/02 15:54:48 serassio Exp $ * * DEBUG: section 16 Cache Manager Objects * AUTHOR: Duane Wessels @@ -63,6 +63,7 @@ static void cachemgrStateFree(cachemgrStateData * mgr); static char *cachemgrPasswdGet(cachemgr_passwd *, const char *); static const char *cachemgrActionProtection(const CacheManagerAction * at); static OBJH cachemgrShutdown; +static OBJH cachemgrReconfigure; static OBJH cachemgrMenu; static OBJH cachemgrOfflineToggle; @@ -74,6 +75,9 @@ CacheManager::CacheManager() registerAction("shutdown", "Shut Down the Squid Process", cachemgrShutdown, 1, 1); + registerAction("reconfigure", + "Reconfigure the Squid Process", + cachemgrReconfigure, 1, 1); registerAction("offline_toggle", "Toggle offline_mode setting", cachemgrOfflineToggle, 1, 1); @@ -348,6 +352,14 @@ cachemgrShutdown(StoreEntry * entryunused) shut_down(0); } +static void +cachemgrReconfigure(StoreEntry * sentry) +{ + debug(16, 0) ("Reconfigure by command.\n"); + reconfigure(SIGHUP); + storeAppendPrintf(sentry, "Reconfiguring Squid Process ...."); +} + static void cachemgrOfflineToggle(StoreEntry * sentry) { diff --git a/src/tests/testCacheManager.cc b/src/tests/testCacheManager.cc index 02b165a618..a66a54f564 100644 --- a/src/tests/testCacheManager.cc +++ b/src/tests/testCacheManager.cc @@ -13,6 +13,10 @@ void shut_down(int) {} +void +reconfigure(int) +{} + /* end stubs */ /* init memory pools */ diff --git a/src/tests/testEvent.cc b/src/tests/testEvent.cc index d91db9fb32..6e880de1e2 100644 --- a/src/tests/testEvent.cc +++ b/src/tests/testEvent.cc @@ -15,6 +15,10 @@ void shut_down(int) {} +void +reconfigure(int) +{} + /* end stubs */ /* init legacy static-initialized modules */ diff --git a/src/tests/testEventLoop.cc b/src/tests/testEventLoop.cc index edbfd81c5d..22baf84040 100644 --- a/src/tests/testEventLoop.cc +++ b/src/tests/testEventLoop.cc @@ -16,6 +16,10 @@ void shut_down(int) {} +void +reconfigure(int) +{} + /* end stubs */ /* init legacy static-initialized modules */ diff --git a/src/tests/testHttpRequest.cc b/src/tests/testHttpRequest.cc index d0840cca6a..ada78952ee 100644 --- a/src/tests/testHttpRequest.cc +++ b/src/tests/testHttpRequest.cc @@ -13,6 +13,10 @@ void shut_down(int) {} +void +reconfigure(int) +{} + /* end stubs */ /* init memory pools */ diff --git a/src/tests/testURL.cc b/src/tests/testURL.cc index 031161bdef..839df9103a 100644 --- a/src/tests/testURL.cc +++ b/src/tests/testURL.cc @@ -14,6 +14,10 @@ void shut_down(int) {} +void +reconfigure(int) +{} + /* end stubs */ /* init memory pools */ diff --git a/src/tests/test_http_range.cc b/src/tests/test_http_range.cc index 2f52f12ae8..fb9348cd8d 100644 --- a/src/tests/test_http_range.cc +++ b/src/tests/test_http_range.cc @@ -1,6 +1,6 @@ /* - * $Id: test_http_range.cc,v 1.3 2007/05/29 13:31:48 amosjeffries Exp $ + * $Id: test_http_range.cc,v 1.3.6.1 2008/03/02 15:54:48 serassio Exp $ * * DEBUG: section 64 HTTP Range Header * AUTHOR: Alex Rousskov @@ -45,6 +45,10 @@ void shut_down(int) {} +void +reconfigure(int) +{} + SQUIDCEXTERN void httpHeaderPutStr(HttpHeader * hdr, http_hdr_type type, const char *str) { fatal ("dummy function\n"); diff --git a/src/ufsdump.cc b/src/ufsdump.cc index 9e0d0abcd6..9f5de947a4 100644 --- a/src/ufsdump.cc +++ b/src/ufsdump.cc @@ -1,6 +1,6 @@ /* - * $Id: ufsdump.cc,v 1.11 2007/11/15 16:47:35 wessels Exp $ + * $Id: ufsdump.cc,v 1.11.4.1 2008/03/02 15:54:48 serassio Exp $ * * DEBUG: section 0 UFS Store Dump * AUTHOR: Robert Collins @@ -48,6 +48,10 @@ void shut_down(int) {} +void +reconfigure(int) +{} + #if WHENITMINIMAL void eventAdd(const char *name, EVH * func, void *arg, double when, int, bool cbdata)