From 924c25a2b9d1aa116382c1706cb7d72c12fd707b Mon Sep 17 00:00:00 2001 From: tpoitzsch Date: Wed, 31 Dec 2014 13:11:09 +0000 Subject: [PATCH] FRITZBOX: freetz bugfix git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@7377 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/72_FRITZBOX.pm | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/fhem/FHEM/72_FRITZBOX.pm b/fhem/FHEM/72_FRITZBOX.pm index 41ccb2e65..e2172eb48 100644 --- a/fhem/FHEM/72_FRITZBOX.pm +++ b/fhem/FHEM/72_FRITZBOX.pm @@ -1530,7 +1530,9 @@ FRITZBOX_Exec_Remote($$) @output=$telnet->cmd($cmd); $result = $output[0]; chomp $result; - FRITZBOX_Log $hash, 4, "Result '$result'"; + my $log = join " ", @output; + chomp $log; + FRITZBOX_Log $hash, 4, "Result '$log'"; return $result; } elsif (ref \$cmd eq "REF") @@ -1546,8 +1548,11 @@ FRITZBOX_Exec_Remote($$) unless ($_ =~ /^sleep/) { @output=$telnet->cmd($_); - $result = join(" ",@output); - $result =~ s/(\r\n|\n\r|\n|\r|\s)$//; + $result = $output[0]; + chomp $result; + my $log = join " ", @output; + chomp $log; + FRITZBOX_Log $hash, 4, "Result '$log'"; } else { @@ -1556,7 +1561,6 @@ FRITZBOX_Exec_Remote($$) $result = ""; } push @resultArray, $result; - FRITZBOX_Log $hash, 5, "Result '$result'"; } @{$cmd} = (); FRITZBOX_Log $hash, 4, "Received ".int(@resultArray)." answer(s)";