Unverified Commit ac6a7fee authored by Stefan Hornburg (Racke)'s avatar Stefan Hornburg (Racke)
Browse files

Add proper exit code on errors to SOAP client script.

parent 36739f1c
......@@ -84,7 +84,7 @@ my $soap_url = $main::options{'soap_url'};
unless (defined $soap_url) {
printf "error : missing soap_url parameter\n";
printf $usage;
exit;
exit 1;
}
my $user_email = $main::options{'user_email'};
......@@ -102,17 +102,17 @@ if (defined $trusted_application) {
unless (defined $trusted_application_password) {
printf "error : missing trusted_application_password parameter\n";
printf $usage;
exit;
exit 1;
}
unless (defined $service) {
printf "error : missing service parameter\n";
printf $usage;
exit;
exit 1;
}
unless (defined $proxy_vars) {
printf "error : missing proxy_vars parameter\n";
printf $usage;
exit;
exit 1;
}
play_soap_as_trusted($soap_url, $trusted_application,
......@@ -128,14 +128,14 @@ if (defined $trusted_application) {
} elsif (defined $cookie) {
printf "error : get_email_cookie\n";
get_email($soap_url, $cookie);
exit;
exit 1;
} else {
unless (defined $session_id
|| (defined $user_email && defined $user_password)) {
printf
"error : missing session_id OR user_email+user_passwors parameters\n";
printf $usage;
exit;
exit 1;
}
play_soap(
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment