Skip to content
Browse files

minor fixes- handle windows newline, send replies to correct stream

  • Loading branch information...
1 parent 1ca3176 commit 56274b944096dbd95c30affd9a38cadfcc21e761 @triffid committed
Showing with 2 additions and 1 deletion.
  1. +2 −1 controller/daemon.pl
View
3 controller/daemon.pl
@@ -71,6 +71,7 @@ sub close_loaded {
sub parseInputLine {
my ($source, $replydest, $inline) = @_;
chomp $inline;
+ $inline =~ s/[\r\n]*$//s;
switch ($inline) {
case /^poke$/ {
$printer->{token}++;
@@ -171,7 +172,7 @@ sub parseInputLine {
}
else {
if ($inline =~ /\S/) {
- $printer->enqueue(\*STDIN, $inline);
+ $printer->enqueue($source, $inline);
}
last;
}

0 comments on commit 56274b9

Please sign in to comment.
Something went wrong with that request. Please try again.