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:
cdd0902
)
send cr/lf to SIP server
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Fri, 20 Mar 2015 13:32:09 +0000
(14:32 +0100)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Fri, 20 Mar 2015 13:32:09 +0000
(14:32 +0100)
scripts/RFID-JSONP-server.pl
patch
|
blob
|
history
diff --git
a/scripts/RFID-JSONP-server.pl
b/scripts/RFID-JSONP-server.pl
index
9396f5d
..
f5fc8bf
100755
(executable)
--- a/
scripts/RFID-JSONP-server.pl
+++ b/
scripts/RFID-JSONP-server.pl
@@
-86,6
+86,8
@@
sub sip2_message {
local $/ = "\r";
$send .= "\r" unless $send =~ m/\r$/;
+ $send .= "\n" unless $send =~ m/\n$/;
+
warn "SIP2 >>>> ",dump($send), "\n";
print $sock $send;
$sock->flush;
@@
-93,9
+95,10
@@
sub sip2_message {
my $expect = substr($send,0,2) | 0x01;
my $in = <$sock>;
+ warn "SIP2 <<<< ",dump($in), "\n";
+
$in =~ s/^\n//;
$in =~ s/\r$//;
- warn "SIP2 <<<< ",dump($in), "\n";
die "empty read from SIP server" unless length $in > 1;