fix bug 3820: rinv for feihu FPC is producing errors

This commit is contained in:
zhaoertao 2013-10-24 02:09:20 -07:00
parent 9b89fdcc07
commit ffe7ccbf3b

View File

@ -2911,8 +2911,10 @@ sub parsefru {
return "unknown-COULDGUESS",undef; #be lazy for now, TODO revisit this and add guessing if it ever matters
}
$currsize=($bytes->[$curridx+1])*8;
@currarea=@{$bytes}[$curridx..($curridx+$currsize-1)]; #splice @$bytes,$curridx,$currsize;
$fruhash->{chassis} = parsechassis(@currarea);
if ($currsize > 0) {
@currarea=@{$bytes}[$curridx..($curridx+$currsize-1)]; #splice @$bytes,$curridx,$currsize;
$fruhash->{chassis} = parsechassis(@currarea);
}
}
if ($bytes->[3]) { #Board info area, to be preserved
$curridx=$bytes->[3]*8;
@ -2920,8 +2922,10 @@ sub parsefru {
return "unknown-COULDGUESS",undef;
}
$currsize=($bytes->[$curridx+1])*8;
@currarea=@{$bytes}[$curridx..($curridx+$currsize-1)];
$fruhash->{board} = parseboard(@currarea);
if ($currsize > 0) {
@currarea=@{$bytes}[$curridx..($curridx+$currsize-1)];
$fruhash->{board} = parseboard(@currarea);
}
}
if (ref $global_sessdata->{currmacs}) {
$fruhash->{board}->{macaddrs}=[];
@ -2938,8 +2942,10 @@ sub parsefru {
return "unknown-COULDGUESS",undef;
}
$currsize=($bytes->[$curridx+1])*8;
@currarea=@{$bytes}[$curridx..($curridx+$currsize-1)];
$fruhash->{product} = parseprod(@currarea);
if ($currsize > 0) {
@currarea=@{$bytes}[$curridx..($curridx+$currsize-1)];
$fruhash->{product} = parseprod(@currarea);
}
}
if ($bytes->[5]) { #Generic multirecord present..
$fruhash->{extra}=[];