From aaffd5822a8a31faa73fa38de0e218741b73d533 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Tue, 11 Nov 2025 15:54:49 -0500 Subject: [PATCH] Move assigning ua up because it gets used in guess_crednetials --- scripts/ZoneMinder/lib/ZoneMinder/Control/AxisV2.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/ZoneMinder/lib/ZoneMinder/Control/AxisV2.pm b/scripts/ZoneMinder/lib/ZoneMinder/Control/AxisV2.pm index ab8b7e8cc..e00a71c7d 100644 --- a/scripts/ZoneMinder/lib/ZoneMinder/Control/AxisV2.pm +++ b/scripts/ZoneMinder/lib/ZoneMinder/Control/AxisV2.pm @@ -52,17 +52,17 @@ sub open { my $self = shift; $self->loadMonitor(); + use LWP::UserAgent; + $self->{ua} = LWP::UserAgent->new; + $self->{ua}->cookie_jar( {} ); + $self->{ua}->agent('ZoneMinder Control Agent/'.ZoneMinder::Base::ZM_VERSION); + $self->{state} = 'closed'; my $uri = $self->guess_credentials(); $uri = new URI() if ! $uri;; # For parent get $$self{BaseURL} = $uri->canonical(); - use LWP::UserAgent; - $self->{ua} = LWP::UserAgent->new; - $self->{ua}->cookie_jar( {} ); - $self->{ua}->agent('ZoneMinder Control Agent/'.ZoneMinder::Base::ZM_VERSION); - $self->{state} = 'closed'; my $realm = $self->{Monitor}->{ControlDevice};