Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
cta
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dCache
cta
Commits
5350e2c8
Commit
5350e2c8
authored
7 years ago
by
Michael Davis
Browse files
Options
Downloads
Patches
Plain Diff
[xrd_ssi_pb] Removes obsolete --stderr option
parent
9ac0e6aa
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
cmdline/EosCtaStub.cpp
+3
-14
3 additions, 14 deletions
cmdline/EosCtaStub.cpp
with
3 additions
and
14 deletions
cmdline/EosCtaStub.cpp
+
3
−
14
View file @
5350e2c8
...
...
@@ -176,15 +176,12 @@ void base64Decode(cta::eos::Notification ¬ification, const std::string &argva
* Fill a Notification message from the command-line parameters
*
* @param[out] notification The protobuf to fill
* @param[out] isStderr --stderr appears on the command line
* @param[in] argc The number of command-line arguments
* @param[in] argv The command-line arguments
*/
void
fillNotification
(
cta
::
eos
::
Notification
&
notification
,
bool
&
isStderr
,
int
argc
,
const
char
*
const
*
const
argv
)
void
fillNotification
(
cta
::
eos
::
Notification
&
notification
,
int
argc
,
const
char
*
const
*
const
argv
)
{
isStderr
=
false
;
// First argument must be a valid command specifying which workflow action to execute
if
(
argc
<
2
)
throw
Usage
;
...
...
@@ -211,8 +208,6 @@ void fillNotification(cta::eos::Notification ¬ification, bool &isStderr, int
{
const
std
::
string
argstr
(
argv
[
arg
]);
if
(
argstr
==
"--stderr"
)
{
isStderr
=
true
;
continue
;
}
if
(
argstr
.
substr
(
0
,
2
)
!=
"--"
||
argc
==
++
arg
)
throw
std
::
runtime_error
(
"Arguments must be provided as --key value pairs"
);
const
std
::
string
argval
(
argv
[
arg
]);
...
...
@@ -272,9 +267,7 @@ int exceptionThrowingMain(int argc, const char *const *const argv)
// Parse the command line arguments: fill the Notification fields
bool
isStderr
;
fillNotification
(
notification
,
isStderr
,
argc
,
argv
);
fillNotification
(
notification
,
argc
,
argv
);
XrdSsiPb
::
Log
::
DumpProtobuf
(
XrdSsiPb
::
Log
::
PROTOBUF
,
&
notification
);
...
...
@@ -303,11 +296,7 @@ int exceptionThrowingMain(int argc, const char *const *const argv)
{
using
namespace
cta
::
xrd
;
case
Response
::
RSP_SUCCESS
:
std
::
cout
<<
response
.
message_txt
()
<<
std
::
endl
;
if
(
isStderr
)
{
std
::
cerr
<<
response
.
message_txt
()
<<
std
::
endl
;
}
break
;
case
Response
::
RSP_SUCCESS
:
std
::
cout
<<
response
.
message_txt
()
<<
std
::
endl
;
break
;
case
Response
::
RSP_ERR_PROTOBUF
:
throw
XrdSsiPb
::
PbException
(
response
.
message_txt
());
case
Response
::
RSP_ERR_CTA
:
throw
std
::
runtime_error
(
response
.
message_txt
());
case
Response
::
RSP_ERR_USER
:
throw
std
::
runtime_error
(
response
.
message_txt
());
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment