push security to javascript
authorDobrica Pavlinusic <dpavlin@rot13.org>
Tue, 27 Jul 2010 20:39:42 +0000 (22:39 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Tue, 27 Jul 2010 20:39:42 +0000 (22:39 +0200)
scripts/RFID-JSONP-server.pl

index 0b4bd3d..a904515 100755 (executable)
@@ -75,6 +75,7 @@ sub http_server {
                                foreach my $tag ( keys %$tags ) {
                                        my $hash = RFID::Serial::Decode::RFID501->to_hash( $tags->{$tag} );
                                        $hash->{sid}  = $tag;
+                                       $hash->{security} = $rfid->read_afi( $tag );
                                        push @{ $json->{tags} }, $hash;
                                };
                                warn "#### ", encode_json($json);