Merge branch 'ent-5575-wizard-de-modulos-y-recon-by-steps' into 'develop'

fix

See merge request artica/pandorafms!3196
This commit is contained in:
Alejandro Fraguas 2020-04-30 18:38:07 +02:00
commit ad5f728414
2 changed files with 9 additions and 12 deletions

View File

@ -1358,7 +1358,7 @@ sub prepare_agent($$) {
$self->{'agents_found'} = {} if ref($self->{'agents_found'}) ne 'HASH';
# Already initialized.
return if ref($self->{'agents_found'}->{$host_name}) eq 'HASH';
return if ref($self->{'agents_found'}->{$addr}) eq 'HASH';
my @addresses = $self->get_addresses($addr);
$self->{'agents_found'}->{$addr} = {

View File

@ -2390,18 +2390,15 @@ sub p_encode_json {
################################################################################
sub p_decode_json {
my ($pa_config, $data) = @_;
# Initialize JSON manager.
my $json = JSON->new->allow_nonref;
my $decoded_data;
if ($JSON::VERSION > 2.90) {
$decoded_data = $json->decode($data);
} else {
if (!is_empty($decoded_data)) {
$decoded_data = decode_json($data);
}
}
if ($JSON::VERSION > 2.90) {
# Initialize JSON manager.
my $json = JSON->new->allow_nonref;
$decoded_data = $json->decode($data);
} else {
$decoded_data = decode_json($data);
}
return $decoded_data;
}