mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
HttpUtils.pm: fix SSL for noConn2 connects (FHEM2FHEM, DevIo.pm) (Forum #55194)
git-svn-id: https://svn.fhem.de/fhem/trunk@11758 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
5c2b43c815
commit
24a3e2c095
@ -257,8 +257,6 @@ HttpUtils_Connect($)
|
||||
return $hash->{callback}($hash, "$host: ".strerror($errno), "")
|
||||
if($errno);
|
||||
|
||||
return $hash->{callback}($hash,undef,undef) if($hash->{noConn2});
|
||||
|
||||
my $err = HttpUtils_Connect2($hash);
|
||||
$hash->{callback}($hash, $err, "") if($err);
|
||||
return $err;
|
||||
@ -331,6 +329,11 @@ HttpUtils_Connect2($)
|
||||
return "$hash->{displayurl}: Can't connect(2) to $hash->{addr}: $err";
|
||||
}
|
||||
|
||||
if($hash->{noConn2}) {
|
||||
$hash->{callback}($hash);
|
||||
return undef;
|
||||
}
|
||||
|
||||
my $data;
|
||||
if(defined($hash->{data})) {
|
||||
if( ref($hash->{data}) eq 'HASH' ) {
|
||||
|
@ -5,6 +5,7 @@ package main;
|
||||
use strict;
|
||||
use warnings;
|
||||
use IO::Socket;
|
||||
use vars qw($SSL_ERROR);
|
||||
|
||||
sub
|
||||
TcpServer_Open($$$)
|
||||
@ -102,7 +103,8 @@ TcpServer_Accept($$)
|
||||
if( !$ret
|
||||
&& $err != EWOULDBLOCK
|
||||
&& $err ne "Socket is not connected") {
|
||||
|
||||
$err = "" if(!$err);
|
||||
$err .= " ".($SSL_ERROR ? $SSL_ERROR : IO::Socket::SSL::errstr());
|
||||
Log3 $name, 1, "$type SSL/HTTPS error: $err";
|
||||
close($clientinfo[0]);
|
||||
return undef;
|
||||
|
Loading…
x
Reference in New Issue
Block a user