mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
49_SSCam(STRM): avoid possible warnings during FHEM shutdown/restart
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@22600 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
50e7441e5b
commit
63acb45bd7
@ -467,6 +467,7 @@ my $defSlim = 3; # default Anzahl der a
|
|||||||
my $defSnum = "1,2,3,4,5,6,7,8,9,10"; # mögliche Anzahl der abzurufenden Schnappschüsse mit snapGallery
|
my $defSnum = "1,2,3,4,5,6,7,8,9,10"; # mögliche Anzahl der abzurufenden Schnappschüsse mit snapGallery
|
||||||
my $compstat = "8.2.8"; # getestete SVS-Version
|
my $compstat = "8.2.8"; # getestete SVS-Version
|
||||||
my $valZoom = ".++,+,stop,-,--."; # Inhalt des Setters "setZoom"
|
my $valZoom = ".++,+,stop,-,--."; # Inhalt des Setters "setZoom"
|
||||||
|
my $shutdownInProcess = 0; # Statusbit shutdown
|
||||||
|
|
||||||
#use vars qw($FW_ME); # webname (default is fhem), used by 97_GROUP/weblink
|
#use vars qw($FW_ME); # webname (default is fhem), used by 97_GROUP/weblink
|
||||||
#use vars qw($FW_subdir); # Sub-path in URL, used by FLOORPLAN/weblink
|
#use vars qw($FW_subdir); # Sub-path in URL, used by FLOORPLAN/weblink
|
||||||
@ -794,6 +795,8 @@ sub delayedShutdown {
|
|||||||
my $hash = shift;
|
my $hash = shift;
|
||||||
my $name = $hash->{NAME};
|
my $name = $hash->{NAME};
|
||||||
|
|
||||||
|
$shutdownInProcess = 1; # Statusbit shutdown setzen -> getApiSites wird nicht mehr ausgeführt
|
||||||
|
|
||||||
Log3($name, 2, "$name - Quit session due to shutdown ...");
|
Log3($name, 2, "$name - Quit session due to shutdown ...");
|
||||||
|
|
||||||
sessionOff($hash);
|
sessionOff($hash);
|
||||||
@ -4109,14 +4112,14 @@ sub sessionOff {
|
|||||||
my $camname = $hash->{CAMNAME};
|
my $camname = $hash->{CAMNAME};
|
||||||
my $name = $hash->{NAME};
|
my $name = $hash->{NAME};
|
||||||
|
|
||||||
RemoveInternalTimer($hash, "FHEM::SSCam::sessionOff");
|
RemoveInternalTimer ($hash, "FHEM::SSCam::sessionOff");
|
||||||
return if(IsDisabled($name));
|
return if(IsDisabled($name));
|
||||||
|
|
||||||
if ($hash->{HELPER}{ACTIVE} eq "off") {
|
if ($hash->{HELPER}{ACTIVE} eq "off") {
|
||||||
$hash->{OPMODE} = "logout";
|
$hash->{OPMODE} = "logout";
|
||||||
|
|
||||||
setActiveToken($hash);
|
setActiveToken($hash);
|
||||||
logout($hash);
|
logout ($hash);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
InternalTimer(gettimeofday()+1.1, "FHEM::SSCam::sessionOff", $hash, 0);
|
InternalTimer(gettimeofday()+1.1, "FHEM::SSCam::sessionOff", $hash, 0);
|
||||||
@ -4355,7 +4358,7 @@ return;
|
|||||||
####### Begin Kameraoperationen mit NonblockingGet (nicht blockierender HTTP-Call) #######
|
####### Begin Kameraoperationen mit NonblockingGet (nicht blockierender HTTP-Call) #######
|
||||||
#############################################################################################################################
|
#############################################################################################################################
|
||||||
sub getApiSites {
|
sub getApiSites {
|
||||||
my ($hash) = @_;
|
my $hash = shift;
|
||||||
my $serveraddr = $hash->{SERVERADDR};
|
my $serveraddr = $hash->{SERVERADDR};
|
||||||
my $serverport = $hash->{SERVERPORT};
|
my $serverport = $hash->{SERVERPORT};
|
||||||
my $name = $hash->{NAME};
|
my $name = $hash->{NAME};
|
||||||
@ -4387,8 +4390,12 @@ sub getApiSites {
|
|||||||
Log3($name, 4, "$name - ####################################################");
|
Log3($name, 4, "$name - ####################################################");
|
||||||
Log3($name, 4, "$name - --- Begin Function getApiSites nonblocking ---");
|
Log3($name, 4, "$name - --- Begin Function getApiSites nonblocking ---");
|
||||||
|
|
||||||
if ($hash->{HELPER}{APIPARSET}) {
|
if ($shutdownInProcess) { # shutdown in Proces -> keine weiteren Aktionen
|
||||||
# API-Hashwerte sind bereits gesetzt -> Abruf überspringen
|
Log3($name, 3, "$name - Shutdown in process. No more activities allowed.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($hash->{HELPER}{APIPARSET}) { # API-Hashwerte sind bereits gesetzt -> Abruf überspringen
|
||||||
Log3($name, 4, "$name - API hashvalues already set - ignore get apisites");
|
Log3($name, 4, "$name - API hashvalues already set - ignore get apisites");
|
||||||
return checkSid($hash);
|
return checkSid($hash);
|
||||||
}
|
}
|
||||||
|
@ -213,7 +213,7 @@ my %vNotesIntern = (
|
|||||||
|
|
||||||
# Versions History extern
|
# Versions History extern
|
||||||
my %vNotesExtern = (
|
my %vNotesExtern = (
|
||||||
"9.6.0" => "12.08.2020 The new attribute 'ptzNoCapPrePat' is available. It's helpfull if your PTZ camera doesn't have the capability ".
|
"9.6.0" => "12.08.2020 The new attribute 'ptzNoCapPrePat' is available. It's helpful if your PTZ camera doesn't have the capability ".
|
||||||
"to deliver Presets and Patrols. Setting the attribute avoid error log messages in that case. ",
|
"to deliver Presets and Patrols. Setting the attribute avoid error log messages in that case. ",
|
||||||
"9.5.0" => "15.07.2020 A new type 'master' supplements the possible createStreamDev command options. The streaming type ".
|
"9.5.0" => "15.07.2020 A new type 'master' supplements the possible createStreamDev command options. The streaming type ".
|
||||||
"'master' cannot play back streams itself, but opens up new possibilities by flexibly accepting streams from ".
|
"'master' cannot play back streams itself, but opens up new possibilities by flexibly accepting streams from ".
|
||||||
@ -467,6 +467,7 @@ my $defSlim = 3; # default Anzahl der a
|
|||||||
my $defSnum = "1,2,3,4,5,6,7,8,9,10"; # mögliche Anzahl der abzurufenden Schnappschüsse mit snapGallery
|
my $defSnum = "1,2,3,4,5,6,7,8,9,10"; # mögliche Anzahl der abzurufenden Schnappschüsse mit snapGallery
|
||||||
my $compstat = "8.2.8"; # getestete SVS-Version
|
my $compstat = "8.2.8"; # getestete SVS-Version
|
||||||
my $valZoom = ".++,+,stop,-,--."; # Inhalt des Setters "setZoom"
|
my $valZoom = ".++,+,stop,-,--."; # Inhalt des Setters "setZoom"
|
||||||
|
my $shutdownInProcess = 0; # Statusbit shutdown
|
||||||
|
|
||||||
#use vars qw($FW_ME); # webname (default is fhem), used by 97_GROUP/weblink
|
#use vars qw($FW_ME); # webname (default is fhem), used by 97_GROUP/weblink
|
||||||
#use vars qw($FW_subdir); # Sub-path in URL, used by FLOORPLAN/weblink
|
#use vars qw($FW_subdir); # Sub-path in URL, used by FLOORPLAN/weblink
|
||||||
@ -794,6 +795,8 @@ sub delayedShutdown {
|
|||||||
my $hash = shift;
|
my $hash = shift;
|
||||||
my $name = $hash->{NAME};
|
my $name = $hash->{NAME};
|
||||||
|
|
||||||
|
$shutdownInProcess = 1; # Statusbit shutdown setzen -> getApiSites wird nicht mehr ausgeführt
|
||||||
|
|
||||||
Log3($name, 2, "$name - Quit session due to shutdown ...");
|
Log3($name, 2, "$name - Quit session due to shutdown ...");
|
||||||
|
|
||||||
sessionOff($hash);
|
sessionOff($hash);
|
||||||
@ -4109,14 +4112,14 @@ sub sessionOff {
|
|||||||
my $camname = $hash->{CAMNAME};
|
my $camname = $hash->{CAMNAME};
|
||||||
my $name = $hash->{NAME};
|
my $name = $hash->{NAME};
|
||||||
|
|
||||||
RemoveInternalTimer($hash, "FHEM::SSCam::sessionOff");
|
RemoveInternalTimer ($hash, "FHEM::SSCam::sessionOff");
|
||||||
return if(IsDisabled($name));
|
return if(IsDisabled($name));
|
||||||
|
|
||||||
if ($hash->{HELPER}{ACTIVE} eq "off") {
|
if ($hash->{HELPER}{ACTIVE} eq "off") {
|
||||||
$hash->{OPMODE} = "logout";
|
$hash->{OPMODE} = "logout";
|
||||||
|
|
||||||
setActiveToken($hash);
|
setActiveToken($hash);
|
||||||
logout($hash);
|
logout ($hash);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
InternalTimer(gettimeofday()+1.1, "FHEM::SSCam::sessionOff", $hash, 0);
|
InternalTimer(gettimeofday()+1.1, "FHEM::SSCam::sessionOff", $hash, 0);
|
||||||
@ -4355,7 +4358,7 @@ return;
|
|||||||
####### Begin Kameraoperationen mit NonblockingGet (nicht blockierender HTTP-Call) #######
|
####### Begin Kameraoperationen mit NonblockingGet (nicht blockierender HTTP-Call) #######
|
||||||
#############################################################################################################################
|
#############################################################################################################################
|
||||||
sub getApiSites {
|
sub getApiSites {
|
||||||
my ($hash) = @_;
|
my $hash = shift;
|
||||||
my $serveraddr = $hash->{SERVERADDR};
|
my $serveraddr = $hash->{SERVERADDR};
|
||||||
my $serverport = $hash->{SERVERPORT};
|
my $serverport = $hash->{SERVERPORT};
|
||||||
my $name = $hash->{NAME};
|
my $name = $hash->{NAME};
|
||||||
@ -4387,8 +4390,12 @@ sub getApiSites {
|
|||||||
Log3($name, 4, "$name - ####################################################");
|
Log3($name, 4, "$name - ####################################################");
|
||||||
Log3($name, 4, "$name - --- Begin Function getApiSites nonblocking ---");
|
Log3($name, 4, "$name - --- Begin Function getApiSites nonblocking ---");
|
||||||
|
|
||||||
if ($hash->{HELPER}{APIPARSET}) {
|
if ($shutdownInProcess) { # shutdown in Proces -> keine weiteren Aktionen
|
||||||
# API-Hashwerte sind bereits gesetzt -> Abruf überspringen
|
Log3($name, 3, "$name - Shutdown in process. No more activities allowed.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($hash->{HELPER}{APIPARSET}) { # API-Hashwerte sind bereits gesetzt -> Abruf überspringen
|
||||||
Log3($name, 4, "$name - API hashvalues already set - ignore get apisites");
|
Log3($name, 4, "$name - API hashvalues already set - ignore get apisites");
|
||||||
return checkSid($hash);
|
return checkSid($hash);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user