From 0f5822d1f7f8ba2edc18e68b65f02d95ab974d33 Mon Sep 17 00:00:00 2001 From: Nick Malyon Date: Fri, 19 Oct 2012 23:51:11 +0100 Subject: [PATCH 1/2] New connection verbose logs were displaying the local IP not the remote one. Fixed. --- shairport.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shairport.pl b/shairport.pl index a4a915a4..2af7473a 100755 --- a/shairport.pl +++ b/shairport.pl @@ -495,7 +495,7 @@ while (1) { foreach my $fh (@waiting) { if ($fh==$listen) { my $new = $listen->accept; - printf "New connection from %s\n", $new->sockhost if $verbose; + printf "New connection from %s\n", $new->peerhost if $verbose; $sel->add($new); $new->blocking(0); From f2b52ea9db1723c9c53f5df8da4de7ce90d3129f Mon Sep 17 00:00:00 2001 From: Nick Malyon Date: Sat, 20 Oct 2012 00:45:09 +0100 Subject: [PATCH 2/2] Quote the path to hairtunes (required if the path contains spaces). --- shairport.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shairport.pl b/shairport.pl index 2af7473a..c53d52ad 100755 --- a/shairport.pl +++ b/shairport.pl @@ -673,7 +673,7 @@ sub conn_handle_request { $dec_args{ao_devicename} = $libao_devicename if defined $libao_devicename; $dec_args{ao_deviceid} = $libao_deviceid if defined $libao_deviceid; - my $dec = $hairtunes_cli . join(' ', '', map { sprintf "%s '%s'", $_, $dec_args{$_} } keys(%dec_args)); + my $dec = '"' . $hairtunes_cli . '"' . join(' ', '', map { sprintf "%s '%s'", $_, $dec_args{$_} } keys(%dec_args)); # print "decode command: $dec\n"; my $decoder = open2(my $dec_out, my $dec_in, $dec);