If local cache failed, conf must be returned even

environments/ppa-mbqj77/deployments/1
Xavier Guimard 15 years ago
parent 8624d5708b
commit 915254a60c
  1. 8
      modules/lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf.pm

@ -152,8 +152,9 @@ sub getConf {
$r = $self->getDBConf($args);
}
else {
$r = $self->{refLocalStorage}->get('conf');
if ( $r->{cfgNum} == $args->{cfgNum} ) {
eval { $r = $self->{refLocalStorage}->get('conf') };
$msg = "Warn: $@" if ($@);
if ( ref($r) and $r->{cfgNum} == $args->{cfgNum} ) {
$msg = "configuration unchanged, get configuration from cache.";
}
else {
@ -275,7 +276,8 @@ sub getLocalConf {
# @param $conf Lemonldap::NG configuration hashRef
sub setLocalConf {
my ( $self, $conf ) = @_;
$self->{refLocalStorage}->set( "conf", $conf );
eval { $self->{refLocalStorage}->set( "conf", $conf ) };
$msg .= "Warn: $@" if ($@);
}
## @method hashRef getDBConf(hashRef args)

Loading…
Cancel
Save