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 {
# 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,