Changeset 130


Ignore:
Timestamp:
May 18, 2013, 10:54:49 AM (12 years ago)
Author:
g7moreau
Message:
  • Small bug in get-vlan-name, return 'empty' if no name
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/klask

    r129 r130  
    14491449         }
    14501450
    1451       my $search_vlan_name = $OID_NUMBER{vlanName} . "$vlan_id";
     1451      my $search_vlan_name = $OID_NUMBER{vlanName} . ".$vlan_id";
    14521452
    14531453      my ($session, $error) = Net::SNMP->session( %session );
     
    14591459
    14601460      if (defined $result and $result->{$search_vlan_name} ne 'noSuchInstance') {
    1461          my $vlan_name = $result->{$search_vlan_name};
    1462          print "Klask find VLAN $vlan_id on switch $sw_name with name $swport\n";
     1461         my $vlan_name = $result->{$search_vlan_name || 'empty'};
     1462         print "Klask find VLAN $vlan_id on switch $sw_name with name $vlan_name\n";
    14631463         }
    14641464      else {
Note: See TracChangeset for help on using the changeset viewer.