2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 12:49:34 +00:00

put loop around syswrite to satisfy large SSL transfers

git-svn-id: https://svn.fhem.de/fhem/trunk@1715 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2012-07-10 06:57:44 +00:00
parent daa01f5326
commit 2396e0246a

View File

@ -162,7 +162,11 @@ telnet_Read($)
if($gotCmd && $hash->{prompt} && !$hash->{rcvdQuit});
if($ret) {
$ret =~ s/\n/\r\n/g if($pw); # only for DOS telnet
syswrite($hash->{CD}, $ret);
for(;;) {
my $l = syswrite($hash->{CD}, $ret);
last if(!$l || $l == length($ret));
$ret = substr($ret, $l);
}
}
CommandDelete(undef, $name) if($hash->{rcvdQuit});
}