From 5843bcb4aeefd5eb3043bf87c23fe105b822fa90 Mon Sep 17 00:00:00 2001 From: garnier-quentin Date: Mon, 27 Mar 2017 14:49:59 +0200 Subject: [PATCH] + Fix #619 --- centreon/common/airespace/snmp/mode/apstatus.pm | 3 ++- centreon/common/airespace/snmp/mode/apusers.pm | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/centreon/common/airespace/snmp/mode/apstatus.pm b/centreon/common/airespace/snmp/mode/apstatus.pm index 4e3690c80..09b697323 100644 --- a/centreon/common/airespace/snmp/mode/apstatus.pm +++ b/centreon/common/airespace/snmp/mode/apstatus.pm @@ -199,7 +199,8 @@ sub manage_selection { { oid => $mapping3->{bsnAPAdminStatus}->{oid} }, ], nothing_quit => 1); - $self->{output}->output_add(long_msg => "Model: " . $self->{results}->{$oid_agentInventoryMachineModel}->{$oid_agentInventoryMachineModel . '.0'}); + $self->{output}->output_add(long_msg => "Model: " . + (defined($self->{results}->{$oid_agentInventoryMachineModel}->{$oid_agentInventoryMachineModel . '.0'}) ? $self->{results}->{$oid_agentInventoryMachineModel}->{$oid_agentInventoryMachineModel . '.0'} : 'unknown')); foreach my $oid (keys %{$self->{results}->{ $mapping->{bsnAPName}->{oid} }}) { $oid =~ /^$mapping->{bsnAPName}->{oid}\.(.*)$/; my $instance = $1; diff --git a/centreon/common/airespace/snmp/mode/apusers.pm b/centreon/common/airespace/snmp/mode/apusers.pm index 345360ba7..5e82930bc 100644 --- a/centreon/common/airespace/snmp/mode/apusers.pm +++ b/centreon/common/airespace/snmp/mode/apusers.pm @@ -219,7 +219,8 @@ sub manage_selection { { oid => $oid_bsnAPIfLoadNumOfClients }, ], nothing_quit => 1); - $self->{output}->output_add(long_msg => "Model: " . $self->{results}->{$oid_agentInventoryMachineModel}->{$oid_agentInventoryMachineModel . '.0'}); + $self->{output}->output_add(long_msg => "Model: " . + (defined($self->{results}->{$oid_agentInventoryMachineModel}->{$oid_agentInventoryMachineModel . '.0'}) ? $self->{results}->{$oid_agentInventoryMachineModel}->{$oid_agentInventoryMachineModel . '.0'} : 'unknown')); foreach my $oid (keys %{$self->{results}->{ $mapping->{bsnMobileStationStatus}->{oid} }}) { $oid =~ /^$mapping->{bsnMobileStationStatus}->{oid}\.(.*)$/; my $instance = $1;