98_telnet.pm: fix asyncOutput fr !showPrompt (Forum #53315)

git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@11603 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2016-06-03 11:09:56 +00:00
parent 3c99dfc24d
commit 18ad40c48c

View File

@ -305,7 +305,10 @@ telnet_Output($$$)
if($ret) { if($ret) {
$ret = utf8ToLatin1($ret) if( $hash->{encoding} eq "latin1" ); $ret = utf8ToLatin1($ret) if( $hash->{encoding} eq "latin1" );
$ret = "\n$ret\n$hash->{prompt} " if(!$nonl); # AsyncOutput stuff if(!$nonl) { # AsyncOutput stuff
$ret = "\n$ret\n$hash->{prompt} " if( $hash->{showPrompt});
$ret = "$ret\n" if(!$hash->{showPrompt});
}
for(;;) { for(;;) {
my $l = syswrite($hash->{CD}, $ret); my $l = syswrite($hash->{CD}, $ret);
last if(!$l || $l == length($ret)); last if(!$l || $l == length($ret));