From 2402bc464987f802c879186122bc17c370880819 Mon Sep 17 00:00:00 2001 From: Agustin Moyano Date: Thu, 12 Dec 2019 21:56:33 -0300 Subject: [PATCH] Bug 23223: Disable syspref cache in SIPServer When a syspref is modified, SIPServer doesn't update it's cached value until restarted. This patch disables syspref cache for SIPServer. To test: 1. set AllowItemsOnHoldCheckoutSIP preference to Don't allow 2. configure and start sipserver 3. with misc/sip_cli_emulator.pl try to checkout an item that has a hold CHECK => checkout is not allowed 4. set AllowItemsOnHoldCheckoutSIP preference to Allow 5. repeat step 3 CHECK => checkout is still not allowed 6. apply this patch and restart_all 7. repeat steps 1 to 5 SUCCESS => checkout is allowed / disallowed according to AllowItemsOnHoldCheckoutSIP preference value and no SIPServer restart is needed 8. Sign off --- C4/SIP/SIPServer.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/C4/SIP/SIPServer.pm b/C4/SIP/SIPServer.pm index 63880c9eb7..8752305153 100755 --- a/C4/SIP/SIPServer.pm +++ b/C4/SIP/SIPServer.pm @@ -28,6 +28,9 @@ use constant LOG_SIP => "local6"; # Local alias for the logging facility # A script with no MAIN namespace? # A module that takes command line args? +#Disable syspref cache +C4::Context->disable_syspref_cache; + # Set interface to 'sip' C4::Context->interface('sip'); -- 2.17.1