fix indent
This commit is contained in:
parent
53da9f000d
commit
c7d7e99fe5
|
@ -65,8 +65,11 @@ sub check_options {
|
|||
my ($self, %options) = @_;
|
||||
|
||||
if (defined($options{option_results}) && defined($options{option_results}->{memcached})) {
|
||||
centreon::plugins::misc::mymodule_load(output => $self->{output}, module => 'Memcached::libmemcached',
|
||||
error_msg => "Cannot load module 'Memcached::libmemcached'.");
|
||||
centreon::plugins::misc::mymodule_load(
|
||||
output => $self->{output},
|
||||
module => 'Memcached::libmemcached',
|
||||
error_msg => "Cannot load module 'Memcached::libmemcached'."
|
||||
);
|
||||
$self->{memcached} = Memcached::libmemcached->new();
|
||||
Memcached::libmemcached::memcached_server_add($self->{memcached}, $options{option_results}->{memcached});
|
||||
}
|
||||
|
@ -133,13 +136,12 @@ sub read {
|
|||
my ($self, %options) = @_;
|
||||
$self->{statefile_suffix} = defined($options{statefile_suffix}) ? $options{statefile_suffix} : $self->{statefile_suffix};
|
||||
$self->{statefile_dir} = defined($options{statefile_dir}) ? $options{statefile_dir} : $self->{statefile_dir};
|
||||
$self->{statefile} = defined($options{statefile}) ? $options{statefile} . $self->{statefile_suffix} :
|
||||
$self->{statefile};
|
||||
$self->{statefile} = defined($options{statefile}) ? $options{statefile} . $self->{statefile_suffix} : $self->{statefile};
|
||||
$self->{no_quit} = defined($options{no_quit}) && $options{no_quit} == 1 ? 1 : 0;
|
||||
|
||||
if (defined($self->{memcached})) {
|
||||
# if "SUCCESS" or "NOT FOUND" is ok. Other with use the file
|
||||
my $val = Memcached::libmemcached::memcached_get($self->{memcached}, $self->{statefile_dir} . "/" . $self->{statefile});
|
||||
my $val = Memcached::libmemcached::memcached_get($self->{memcached}, $self->{statefile_dir} . '/' . $self->{statefile});
|
||||
if (defined($self->{memcached}->errstr) && $self->{memcached}->errstr =~ /^SUCCESS|NOT FOUND$/i) {
|
||||
$self->{memcached_ok} = 1;
|
||||
if (defined($val)) {
|
||||
|
|
Loading…
Reference in New Issue