mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-16 23:06:05 +00:00
TcpServerUtils.pm: remove SSL/HTTP check (Forum #108926), add FWTP Hook
git-svn-id: https://svn.fhem.de/fhem/trunk@21344 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
b16b87815d
commit
fa5267496c
@ -131,15 +131,10 @@ TcpServer_Accept($$)
|
||||
$err = "" if(!$err);
|
||||
$err .= " ".($SSL_ERROR ? $SSL_ERROR : IO::Socket::SSL::errstr());
|
||||
my $errLevel = ($err =~ m/error:14094416:SSL/ ? 5 : 1); # 61511
|
||||
|
||||
if($err =~ m/http request/) { # HTTP on HTTPS.
|
||||
Log3 $name, $errLevel, "HTTP connect to HTTP socket (peer: $caddr)";
|
||||
} else {
|
||||
Log3 $name, $errLevel, "$type SSL/HTTPS error: $err (peer: $caddr)"
|
||||
if($err !~ m/error:00000000:lib.0.:func.0.:reason.0./); #Forum 56364
|
||||
close($clientinfo[0]);
|
||||
return undef;
|
||||
}
|
||||
Log3 $name, $errLevel, "$type SSL/HTTPS error: $err (peer: $caddr)"
|
||||
if($err !~ m/error:00000000:lib.0.:func.0.:reason.0./); #Forum 56364
|
||||
close($clientinfo[0]);
|
||||
return undef;
|
||||
}
|
||||
}
|
||||
|
||||
@ -314,6 +309,12 @@ TcpServer_WriteBlocking($$)
|
||||
{
|
||||
my( $hash, $txt ) = @_;
|
||||
|
||||
if($hash->{WriteFn}) { # FWTP needs it
|
||||
no strict "refs";
|
||||
return &{$hash->{WriteFn}}($hash, \$txt);
|
||||
use strict "refs";
|
||||
}
|
||||
|
||||
my $sock = $hash->{CD};
|
||||
return undef if(!$sock);
|
||||
my $off = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user