mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 16:24:54 +02:00
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:
commit
ad5f728414
@ -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} = {
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user