diff --git a/scripts/ZoneMinder/lib/ZoneMinder/Control/TapoC520WS_ONVIF.pm b/scripts/ZoneMinder/lib/ZoneMinder/Control/TapoC520WS_ONVIF.pm index 6824bea6d..f4462ab2e 100644 --- a/scripts/ZoneMinder/lib/ZoneMinder/Control/TapoC520WS_ONVIF.pm +++ b/scripts/ZoneMinder/lib/ZoneMinder/Control/TapoC520WS_ONVIF.pm @@ -87,7 +87,6 @@ our @ISA = qw(ZoneMinder::Control); our %CamParams = (); -our ($profileToken, $address, $port, %identity); my ( $controlUri, $scheme ); # ========================================================================== @@ -126,6 +125,8 @@ use Time::HiRes qw( usleep ); use LWP::UserAgent; use IO::Socket::SSL; +my $profileToken; + sub open { my $self = shift; @@ -216,7 +217,7 @@ sub sendCmd { my $server_endpoint = $$self{BaseURL}.$$self{path}; my $req = HTTP::Request->new(POST => $server_endpoint); $req->header('content-type' => $content_type); - $req->header('Host' => $address . ':' . $port); + $req->header('Host' => $$self{address} . ':' . $$self{port}); $req->header('content-length' => length($msg)); $req->header('accept-encoding' => 'gzip, deflate'); $req->header('connection' => 'Close');