mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-04 05:16:45 +00:00
00_FBAHAHTTP.pm: move $sid to ProcessStack from Write (Forum #58147)
git-svn-id: https://svn.fhem.de/fhem/trunk@17700 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
711d8e6bb8
commit
5bddb23abe
@ -228,8 +228,10 @@ FBAHAHTTP_ProcessStack($)
|
||||
my $name = $hash->{NAME};
|
||||
my $msg = $hash->{CmdStack}->[0];
|
||||
my $host = ($hash->{DEF} =~ m/^http/i ? $hash->{DEF} : "http://$hash->{DEF}");
|
||||
my $sid = $hash->{".SID"};
|
||||
return if(!$sid);
|
||||
HttpUtils_NonblockingGet({
|
||||
url=>"$host/webservices/homeautoswitch.lua?$msg",
|
||||
url=>"$host/webservices/homeautoswitch.lua?sid=$sid&$msg",
|
||||
loglevel => AttrVal($name, "verbose", 4),
|
||||
timeout => AttrVal($name, "fbTimeout", 4),
|
||||
callback => sub {
|
||||
@ -280,7 +282,7 @@ FBAHAHTTP_Write($$$)
|
||||
return $ret if($ret);
|
||||
$sid = $hash->{".SID"};
|
||||
}
|
||||
push(@{$hash->{CmdStack}}, "sid=$sid&ain=$fn&switchcmd=$msg");
|
||||
push(@{$hash->{CmdStack}}, "ain=$fn&switchcmd=$msg");
|
||||
FBAHAHTTP_ProcessStack($hash) if(@{$hash->{CmdStack}} == 1);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user