Use plural soap versions

This commit is contained in:
Isaac Connor 2020-05-18 17:57:40 -04:00
parent 3c2e26ac32
commit b99059638a
2 changed files with 5 additions and 5 deletions

View File

@ -163,7 +163,7 @@ sub interpret_messages {
# functions
sub discover {
my ($soap_version, $net_interface) = @_;
my ($soap_versions, $net_interface) = @_;
my @results;
## collect all responses
@ -178,7 +178,7 @@ sub discover {
my $uuid_gen = Data::UUID->new();
foreach my $version ( $soap_version ? ( $soap_version ) : ( '1.1', '1.2') ) {
foreach my $version ( $soap_versions ? ( split(',',$soap_versions) ) : ( '1.1', '1.2') ) {
my %services;
print "Probing for SOAP $version\n" if $verbose;

View File

@ -41,7 +41,7 @@ my $OPTIONS = 'v';
sub HELP_MESSAGE {
my ($fh, $pkg, $ver, $opts) = @_;
print $fh "Usage: " . __FILE__ . " [-v] probe <soap version> <network interface>\n";
print $fh "Usage: " . __FILE__ . " [-v] probe <soap versions> <network interface>\n";
print $fh " " . __FILE__ . " [-v] <command> <device URI> <soap version> <user> <password>\n";
print $fh <<EOF
Commands are:
@ -53,7 +53,7 @@ sub HELP_MESSAGE {
-v - increase verbosity
Device access parameters (for all commands but 'probe'):
device URL - the ONVIF Device service URL
soap version - SOAP version (1.1 or 1.2)
soap versions - SOAP versions (1.1 or 1.2 or 1.1,1.2)
user - username of a user with access to the device
password - password for the user
EOF
@ -69,7 +69,7 @@ if ( !getopts($OPTIONS) ) {
my $action = shift;
if ( ! defined $action ) {
if ( !defined $action ) {
HELP_MESSAGE(\*STDOUT);
exit(1);
}