Skip to content

Commit

Permalink
send cr/lf to SIP server
Browse files Browse the repository at this point in the history
  • Loading branch information
dpavlin committed Mar 20, 2015
1 parent cdd0902 commit ec011db
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/RFID-JSONP-server.pl
Expand Up @@ -86,16 +86,19 @@ 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;

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;

Expand Down

0 comments on commit ec011db

Please sign in to comment.