projects
/
Biblio-RFID.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
328be6e
)
report SIP2 empty read
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Fri, 20 Mar 2015 13:20:35 +0000
(14:20 +0100)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Fri, 20 Mar 2015 13:20:35 +0000
(14:20 +0100)
scripts/RFID-JSONP-server.pl
patch
|
blob
|
history
diff --git
a/scripts/RFID-JSONP-server.pl
b/scripts/RFID-JSONP-server.pl
index
3e1d4fd
..
9396f5d
100755
(executable)
--- a/
scripts/RFID-JSONP-server.pl
+++ b/
scripts/RFID-JSONP-server.pl
@@
-92,15
+92,12
@@
sub sip2_message {
my $expect = substr($send,0,2) | 0x01;
- my $in = '';
- my $repeat = 1;
- while ( $in eq '' && $repeat < 10 ) {
- $in = <$sock>;
- $in =~ s/^\n//;
- $in =~ s/\r$//;
- warn "SIP2 <<<< ",dump($in), " repeat: $repeat\n";
- $repeat++;
- }
+ my $in = <$sock>;
+ $in =~ s/^\n//;
+ $in =~ s/\r$//;
+ warn "SIP2 <<<< ",dump($in), "\n";
+
+ die "empty read from SIP server" unless length $in > 1;
die "expected $expect" unless substr($in,0,2) != $expect;