mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-30 18:12:28 +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:
parent
85ee524c1e
commit
2492697bff
@ -24,7 +24,7 @@ FB_doCheckPW($$$)
|
|||||||
{
|
{
|
||||||
my ($host, $user, $pw) = @_;
|
my ($host, $user, $pw) = @_;
|
||||||
my $data = GetFileFromURL(FB_host2URL($host)."login_sid.lua",undef,undef,1);
|
my $data = GetFileFromURL(FB_host2URL($host)."login_sid.lua",undef,undef,1);
|
||||||
return undef if(!$data);
|
return if(!$data);
|
||||||
|
|
||||||
my $chl="";
|
my $chl="";
|
||||||
$chl = $1 if($data =~ /<Challenge>(\w+)<\/Challenge>/i);
|
$chl = $1 if($data =~ /<Challenge>(\w+)<\/Challenge>/i);
|
||||||
@ -48,8 +48,9 @@ FB_doCheckPW($$$)
|
|||||||
$url .= "?username=$user" if($user);
|
$url .= "?username=$user" if($user);
|
||||||
|
|
||||||
$data = GetFileFromURL($url, undef, $data, 1);
|
$data = GetFileFromURL($url, undef, $data, 1);
|
||||||
|
return if(!$data);
|
||||||
my $sid = $1 if($data =~ /<SID>(\w+)<\/SID>/i);
|
my $sid = $1 if($data =~ /<SID>(\w+)<\/SID>/i);
|
||||||
$sid = undef if($sid =~ m/^0*$/);
|
return if($sid =~ m/^0*$/);
|
||||||
return $sid;
|
return $sid;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user