--------------------- PatchSet 12101 Date: 2008/05/04 23:27:40 Author: hno Branch: SQUID_2_7 Tag: (none) Log: Author: serassio This patch add the reconfigure restricted action to Cache Manager. Imported from nt Devel branch Members: src/cache_manager.c:1.31.2.1->1.31.2.2 src/cf.data.pre:1.450.2.16->1.450.2.17 Index: squid/src/cache_manager.c =================================================================== RCS file: /cvsroot/squid/squid/src/cache_manager.c,v retrieving revision 1.31.2.1 retrieving revision 1.31.2.2 diff -u -r1.31.2.1 -r1.31.2.2 --- squid/src/cache_manager.c 4 May 2008 23:23:13 -0000 1.31.2.1 +++ squid/src/cache_manager.c 4 May 2008 23:27:40 -0000 1.31.2.2 @@ -1,6 +1,6 @@ /* - * $Id: cache_manager.c,v 1.31.2.1 2008/05/04 23:23:13 hno Exp $ + * $Id: cache_manager.c,v 1.31.2.2 2008/05/04 23:27:40 hno Exp $ * * DEBUG: section 16 Cache Manager Objects * AUTHOR: Duane Wessels @@ -63,6 +63,7 @@ static char *cachemgrPasswdGet(cachemgr_passwd *, const char *); static const char *cachemgrActionProtection(const action_table * at); static OBJH cachemgrShutdown; +static OBJH cachemgrReconfigure; static OBJH cachemgrMenu; static OBJH cachemgrOfflineToggle; @@ -272,6 +273,14 @@ } static void +cachemgrReconfigure(StoreEntry * sentry) +{ + debug(16, 0) ("Reconfigure by command.\n"); + storeAppendPrintf(sentry, "Reconfiguring Squid Process ...."); + reconfigure(SIGHUP); +} + +static void cachemgrOfflineToggle(StoreEntry * sentry) { Config.onoff.offline = !Config.onoff.offline; @@ -331,6 +340,9 @@ cachemgrRegister("shutdown", "Shut Down the Squid Process", cachemgrShutdown, 1, 1); + cachemgrRegister("reconfigure", + "Reconfigure the Squid Process", + cachemgrReconfigure, 1, 1); cachemgrRegister("offline_toggle", "Toggle offline_mode setting", cachemgrOfflineToggle, 1, 1); Index: squid/src/cf.data.pre =================================================================== RCS file: /cvsroot/squid/squid/src/cf.data.pre,v retrieving revision 1.450.2.16 retrieving revision 1.450.2.17 diff -u -r1.450.2.16 -r1.450.2.17 --- squid/src/cf.data.pre 21 Apr 2008 02:49:44 -0000 1.450.2.16 +++ squid/src/cf.data.pre 4 May 2008 23:27:40 -0000 1.450.2.17 @@ -1,6 +1,6 @@ # -# $Id: cf.data.pre,v 1.450.2.16 2008/04/21 02:49:44 hno Exp $ +# $Id: cf.data.pre,v 1.450.2.17 2008/05/04 23:27:40 hno Exp $ # # SQUID Web Proxy Cache http://www.squid-cache.org/ # ---------------------------------------------------------- @@ -5369,6 +5369,7 @@ offline_toggle * pconn peer_select + reconfigure * redirector refresh server_list