2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-07 12:58:13 +00:00

72_FRITZBOX.pm: get <name> tr064Command gehärtet

git-svn-id: https://svn.fhem.de/fhem/trunk@27336 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
jowiemann 2023-03-17 15:03:29 +00:00
parent bcea6ae060
commit 0b4f783dad

View File

@ -41,7 +41,7 @@ use warnings;
use Blocking;
use HttpUtils;
my $ModulVersion = "07.50.9b";
my $ModulVersion = "07.50.9c";
my $missingModul = "";
my $missingModulWeb = "";
my $missingModulTR064 = "";
@ -246,7 +246,7 @@ sub FRITZBOX_Define($$)
$hash->{NAME} = $name;
$hash->{VERSION} = $ModulVersion;
$hash->{HOST} = "undefined";
$hash->{HOST} = "fritz.box";
$hash->{HOST} = $args[2] if defined $args[2] && $args[2] =~ m=$URL_MATCH=i;
$hash->{fhem}{definedHost} = $hash->{HOST}; # to cope with old attribute definitions
@ -4501,7 +4501,16 @@ sub FRITZBOX_TR064_Cmd($$$)
-> uri( "urn:dslforum-org:service:".$service )
-> proxy('https://'.$host.":".$port."/upnp/control/".$control, ssl_opts => [ SSL_verify_mode => 0 ], timeout => 10 )
-> readable(1);
my $res = $soap -> call( $action => @soapParams );
my $res = eval { $soap -> call( $action => @soapParams )};
if ($@) {
FRITZBOX_Log $hash, 2, "INFO: TR064-PARAM-Error: " . $@;
my %errorMsg = ( "Error" => $@ );
push @retArray, \%errorMsg;
$FRITZBOX_TR064pwd = undef;
} else {
unless( $res ) { # Transport-Error
FRITZBOX_Log $hash, 5, "DEBUG: TR064-Transport-Error: ".$soap->transport->status;
@ -4530,6 +4539,7 @@ sub FRITZBOX_TR064_Cmd($$$)
push @retArray, $res->body;
}
}
}
@{$cmdArray} = ();
return @retArray;