/[RFID]/3m-810.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /3m-810.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 41 by dpavlin, Thu Jun 4 13:36:20 2009 UTC revision 42 by dpavlin, Thu Jun 4 13:52:10 2009 UTC
# Line 261  sub read_tag_data { Line 261  sub read_tag_data {
261          $tags_data->{ $tag } = join('', @{ $tag_data_block->{$tag} });          $tags_data->{ $tag } = join('', @{ $tag_data_block->{$tag} });
262    
263          my $item_type_nr = ord(substr( $tags_data->{$tag}, 3, 1 ));          my $item_type_nr = ord(substr( $tags_data->{$tag}, 3, 1 ));
264          print "DATA $tag ",dump( $tags_data ), " item type: ", ( $item_type->{ $item_type_nr } || "UNKWOWN '$item_type_nr' in " . dump( $item_type ) ), "\n";          print "DATA $tag ",dump( $tags_data ), " item type: ", ( $item_type->{ $item_type_nr } || "UNKWOWN '$item_type_nr'" ), "\n";
265    
266          return $last_block;          return $last_block + 1;
267  }  }
268    
269  sub read_tag {  sub read_tag {
# Line 451  sub skip_assert { Line 451  sub skip_assert {
451  sub assert {  sub assert {
452          my ( $from, $to ) = @_;          my ( $from, $to ) = @_;
453    
         return unless $assert->{expect};  
   
454          $from ||= 0;          $from ||= 0;
455          $to = length( $assert->{expect} ) if ! defined $to;          $to = length( $assert->{expect} ) if ! defined $to;
456    
# Line 530  sub readchunk { Line 528  sub readchunk {
528          } sort { length($a) <=> length($b) } keys %$dispatch;          } sort { length($a) <=> length($b) } keys %$dispatch;
529          warn "?? payload dispatch to ",dump( $payload, $dispatch, $to ) if $debug;          warn "?? payload dispatch to ",dump( $payload, $dispatch, $to ) if $debug;
530    
531          if ( defined $to && $payload ) {          if ( defined $to ) {
532                  my $rest = substr( $payload, length($to) );                  my $rest = substr( $payload, length($to) ) if length($to) < length($payload);
533                  warn "## DISPATCH payload to with rest", dump( $payload, $to, $rest ) if $debug;                  warn "## DISPATCH payload to with rest", dump( $payload, $to, $rest ) if $debug;
534                  $dispatch->{ $to }->( $rest );                  $dispatch->{ $to }->( $rest );
535          } else {          } else {

Legend:
Removed from v.41  
changed lines
  Added in v.42

  ViewVC Help
Powered by ViewVC 1.1.26