be explici about which unnamed array we are access for getopts. Default username and password to ''

This commit is contained in:
Isaac Connor 2016-10-04 14:33:13 -04:00
parent e7eab488c9
commit 7561dc00ea
1 changed files with 4 additions and 5 deletions

View File

@ -371,11 +371,10 @@ if($action eq "probe") {
} }
else { else {
# all other actions need URI and credentials # all other actions need URI and credentials
my $url_svc_device = shift; my $url_svc_device = shift @ARGV;
$soap_version = shift; $soap_version = shift @ARGV;
my $username = @_ ? shift : ''; my $username = @ARGV ? shift @ARGV : '';
my $password = @_ ? shift : ''; my $password = @ARGV ? shift @ARGV: '';
print "Username: $username";
$client = ONVIF::Client->new( { $client = ONVIF::Client->new( {
'url_svc_device' => $url_svc_device, 'url_svc_device' => $url_svc_device,