mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 06:39:11 +00:00
^D (EOF) kills fhem
git-svn-id: https://svn.fhem.de/fhem/trunk@1749 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
98bc0176b2
commit
724ed8e61e
@ -56,7 +56,15 @@ telnet_Define($$$)
|
||||
return "Usage: define <name> telnet [IPV6:]<tcp-portnr> [global]"
|
||||
if($port !~ m/^(IPV6:)?\d+$/ || ($global && $global ne "global"));
|
||||
|
||||
return TcpServer_Open($hash, $port, $global);
|
||||
my $ret = TcpServer_Open($hash, $port, $global);
|
||||
|
||||
# Make sure that fhem only runs once
|
||||
if($ret && !$init_done) {
|
||||
Log 1, "$ret. Exiting.";
|
||||
exit(1);
|
||||
}
|
||||
return $ret;
|
||||
|
||||
}
|
||||
|
||||
sub
|
||||
@ -94,7 +102,7 @@ telnet_Read($)
|
||||
}
|
||||
if(ord($buf) == 4) { # EOT / ^D
|
||||
CommandQuit($hash, "");
|
||||
next;
|
||||
return;
|
||||
}
|
||||
|
||||
$buf =~ s/\r//g;
|
||||
|
Loading…
Reference in New Issue
Block a user