98_telnet.pm: avoid crash if async output channel is closed
git-svn-id: https://svn.fhem.de/fhem/trunk@23035 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
@@ -292,7 +292,7 @@ telnet_Output($$$)
|
|||||||
{
|
{
|
||||||
my ($hash,$ret,$nonl) = @_;
|
my ($hash,$ret,$nonl) = @_;
|
||||||
|
|
||||||
if($ret) {
|
if($ret && defined($hash->{CD})) {
|
||||||
$ret = utf8ToLatin1($ret) if( $hash->{encoding} eq "latin1" );
|
$ret = utf8ToLatin1($ret) if( $hash->{encoding} eq "latin1" );
|
||||||
if(!$nonl) { # AsyncOutput stuff
|
if(!$nonl) { # AsyncOutput stuff
|
||||||
$ret = "\n$ret\n$hash->{prompt} " if( $hash->{showPrompt});
|
$ret = "\n$ret\n$hash->{prompt} " if( $hash->{showPrompt});
|
||||||
|
|||||||
Reference in New Issue
Block a user