From 7561dc00eab13939d719f65cc5252aacc7c389d4 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Tue, 4 Oct 2016 14:33:13 -0400 Subject: [PATCH] be explici about which unnamed array we are access for getopts. Default username and password to '' --- onvif/scripts/zmonvif-probe.pl | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/onvif/scripts/zmonvif-probe.pl b/onvif/scripts/zmonvif-probe.pl index c1f39c020..a5aee9574 100755 --- a/onvif/scripts/zmonvif-probe.pl +++ b/onvif/scripts/zmonvif-probe.pl @@ -371,11 +371,10 @@ if($action eq "probe") { } else { # all other actions need URI and credentials - my $url_svc_device = shift; - $soap_version = shift; - my $username = @_ ? shift : ''; - my $password = @_ ? shift : ''; -print "Username: $username"; + my $url_svc_device = shift @ARGV; + $soap_version = shift @ARGV; + my $username = @ARGV ? shift @ARGV : ''; + my $password = @ARGV ? shift @ARGV: ''; $client = ONVIF::Client->new( { 'url_svc_device' => $url_svc_device,