From: Jan Michel Date: Tue, 15 Oct 2013 14:05:51 +0000 (+0200) Subject: fixed bug with empty responses X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=06519864db3dd9bd60c92c4f5f2c09e902955912;p=daqtools.git fixed bug with empty responses --- diff --git a/xml-db/get.pl b/xml-db/get.pl index 3383c86..f60e21a 100755 --- a/xml-db/get.pl +++ b/xml-db/get.pl @@ -207,6 +207,7 @@ sub requestdata { $size = $size * $obj->{repeat}; } $o = trb_register_read_mem($netaddr,$obj->{address}+$offset,0,$size); + next unless defined $o; foreach my $k (keys $o) { for(my $i = 0; $i < $size; $i++) { $data->{$obj->{address}+$offset+$i}->{$k} = $o->{$k}->[$i]; @@ -224,6 +225,7 @@ sub requestdata { $slice = 0 unless defined $slice; do { $o = trb_register_read($netaddr,$obj->{address}+$slice*$stepsize); + next unless defined $o; foreach my $k (keys $o) { $data->{$obj->{address}}->{$k} = $o->{$k}; } @@ -314,6 +316,7 @@ sub runandprint { do { $o = trb_register_read($netaddr,$obj->{address}+$slice*$stepsize); + next unless defined $o; #### Prepare table header line my $t;