Skip to content

Commit

Permalink
minor fixes- handle windows newline, send replies to correct stream
Browse files Browse the repository at this point in the history
  • Loading branch information
triffid committed Apr 7, 2012
1 parent 1ca3176 commit 56274b9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion controller/daemon.pl
Expand Up @@ -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}++;
Expand Down Expand Up @@ -171,7 +172,7 @@ sub parseInputLine {
}
else {
if ($inline =~ /\S/) {
$printer->enqueue(\*STDIN, $inline);
$printer->enqueue($source, $inline);
}
last;
}
Expand Down

0 comments on commit 56274b9

Please sign in to comment.