fixed up to make the remote settings grabbing work...
authorerickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Wed, 16 Feb 2005 17:48:04 +0000 (17:48 +0000)
committererickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Wed, 16 Feb 2005 17:48:04 +0000 (17:48 +0000)
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@75 9efc2488-bf62-4759-914b-345cdb29e865

src/perlmods/OpenSRF/Utils/SettingsClient.pm

index 6a4365d..0f1eeaa 100755 (executable)
@@ -1,3 +1,4 @@
+use strict; use warnings;
 package OpenSRF::Utils::SettingsClient;
 use OpenSRF::Utils::SettingsParser;
 use OpenSRF::System;
@@ -17,6 +18,9 @@ $host_config = undef;
 sub config_value {
        my($self,@keys) = @_;
 
+
+       my $bsconfig = OpenSRF::Utils::Config->current;
+       my $host = $bsconfig->env->hostname;
        if(!$host_config) { grab_host_config($host); }
        if(!$host_config) {
                throw OpenSRF::EX::Config ("Unable to retrieve host config for $host" );
@@ -46,6 +50,7 @@ sub grab_host_config {
 
        my $host = shift;
 
+       warn "Grabbing Host config for $host\n";
        OpenSRF::System::bootstrap_client("system_client");
        $session = OpenSRF::AppSession->create( "settings" ) unless $session;
        my $bsconfig = OpenSRF::Utils::Config->current;