2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-03 16:56:54 +00:00

FritzBoxUtils.pm: avoid WARNING on empty FritzBox answer (Forum #109699)

git-svn-id: https://svn.fhem.de/fhem/trunk@21592 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2020-04-04 12:34:04 +00:00
parent 85ee524c1e
commit 2492697bff

View File

@ -24,7 +24,7 @@ FB_doCheckPW($$$)
{
my ($host, $user, $pw) = @_;
my $data = GetFileFromURL(FB_host2URL($host)."login_sid.lua",undef,undef,1);
return undef if(!$data);
return if(!$data);
my $chl="";
$chl = $1 if($data =~ /<Challenge>(\w+)<\/Challenge>/i);
@ -48,8 +48,9 @@ FB_doCheckPW($$$)
$url .= "?username=$user" if($user);
$data = GetFileFromURL($url, undef, $data, 1);
return if(!$data);
my $sid = $1 if($data =~ /<SID>(\w+)<\/SID>/i);
$sid = undef if($sid =~ m/^0*$/);
return if($sid =~ m/^0*$/);
return $sid;
}
}