mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 08:45:12 +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';
|
$self->{'agents_found'} = {} if ref($self->{'agents_found'}) ne 'HASH';
|
||||||
|
|
||||||
# Already initialized.
|
# 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);
|
my @addresses = $self->get_addresses($addr);
|
||||||
$self->{'agents_found'}->{$addr} = {
|
$self->{'agents_found'}->{$addr} = {
|
||||||
|
@ -2390,17 +2390,14 @@ sub p_encode_json {
|
|||||||
################################################################################
|
################################################################################
|
||||||
sub p_decode_json {
|
sub p_decode_json {
|
||||||
my ($pa_config, $data) = @_;
|
my ($pa_config, $data) = @_;
|
||||||
|
|
||||||
# Initialize JSON manager.
|
|
||||||
my $json = JSON->new->allow_nonref;
|
|
||||||
my $decoded_data;
|
my $decoded_data;
|
||||||
|
|
||||||
if ($JSON::VERSION > 2.90) {
|
if ($JSON::VERSION > 2.90) {
|
||||||
|
# Initialize JSON manager.
|
||||||
|
my $json = JSON->new->allow_nonref;
|
||||||
$decoded_data = $json->decode($data);
|
$decoded_data = $json->decode($data);
|
||||||
} else {
|
} else {
|
||||||
if (!is_empty($decoded_data)) {
|
|
||||||
$decoded_data = decode_json($data);
|
$decoded_data = decode_json($data);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $decoded_data;
|
return $decoded_data;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user