From 5efbb97cbeb87d37b4f64bcef8babeab5e5c54b1 Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Thu, 15 Nov 2012 12:20:11 -0500 Subject: [PATCH] Move setting of OpenSRF::Application::shared_conf to load_bootstrap_config. shared_conf was not available and broke clients that were not in a service, such as the Evergreen CStoreEditor. Signed-off-by: Jason Stephenson Signed-off-by: Dan Scott --- src/perl/lib/OpenSRF/System.pm | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/perl/lib/OpenSRF/System.pm b/src/perl/lib/OpenSRF/System.pm index 62a17a8..e26579b 100644 --- a/src/perl/lib/OpenSRF/System.pm +++ b/src/perl/lib/OpenSRF/System.pm @@ -35,6 +35,14 @@ sub load_bootstrap_config { OpenSRF::Transport->message_envelope("OpenSRF::Transport::SlimJabber::MessageWrapper"); OpenSRF::Transport::PeerHandle->set_peer_client("OpenSRF::Transport::SlimJabber::PeerConnection"); OpenSRF::Application->server_class('client'); + # Read in a shared portion of the config file + # for later use in log parameter redaction + $OpenSRF::Application::shared_conf = OpenSRF::Utils::Config->load( + 'config_file' => OpenSRF::Utils::Config->current->FILE, + 'nocache' => 1, + 'force' => 1, + 'base_path' => '/config/shared' + ); } # ---------------------------------------------- @@ -84,15 +92,6 @@ sub run_service { OpenSRF::Application->application_implementation->initialize() if (OpenSRF::Application->application_implementation->can('initialize')); - # Read in a shared portion of the config file - # for later use in log parameter redaction - $OpenSRF::Application::shared_conf = OpenSRF::Utils::Config->load( - 'config_file' => OpenSRF::Utils::Config->current->FILE, - 'nocache' => 1, - 'force' => 1, - 'base_path' => '/config/shared' - ); - # kill the temp connection OpenSRF::Transport::PeerHandle->retrieve->disconnect; -- 2.43.2