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
e5589cfa
Commit
e5589cfa
authored
7 years ago
by
Michael Davis
Browse files
Options
Downloads
Patches
Plain Diff
[EOS-CTA] SetNilResponse() if Response is empty
parent
7606a797
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
xroot_ssi_pb/XrdSsiPbRequest.hpp
+5
-1
5 additions, 1 deletion
xroot_ssi_pb/XrdSsiPbRequest.hpp
xroot_ssi_pb/XrdSsiPbRequestProc.hpp
+12
-3
12 additions, 3 deletions
xroot_ssi_pb/XrdSsiPbRequestProc.hpp
with
17 additions
and
4 deletions
xroot_ssi_pb/XrdSsiPbRequest.hpp
+
5
−
1
View file @
e5589cfa
...
...
@@ -236,6 +236,10 @@ template<typename RequestType, typename MetadataType, typename AlertType>
XrdSsiRequest
::
PRD_Xeq
Request
<
RequestType
,
MetadataType
,
AlertType
>
::
ProcessResponseData
(
const
XrdSsiErrInfo
&
eInfo
,
char
*
response_bufptr
,
int
response_buflen
,
bool
is_last
)
{
#ifdef XRDSSI_DEBUG
std
::
cout
<<
"[DEBUG] ProcessResponseData(): received "
<<
response_buflen
<<
" bytes of data"
<<
std
::
endl
;
#endif
// The buffer length can be 0 if the response is metadata only
if
(
response_buflen
!=
0
)
...
...
@@ -247,7 +251,7 @@ XrdSsiRequest::PRD_Xeq Request<RequestType, MetadataType, AlertType>
if
(
!
is_last
)
{
// If there is more data
m
get the next chunk
// If there is more data
,
get the next chunk
GetResponseData
(
response_bufptr
,
m_response_bufsize
);
}
...
...
This diff is collapsed.
Click to expand it.
xroot_ssi_pb/XrdSsiPbRequestProc.hpp
+
12
−
3
View file @
e5589cfa
...
...
@@ -177,10 +177,19 @@ void RequestProc<RequestType, MetadataType, AlertType>::Execute()
SetMetadata
(
m_metadata_str
.
c_str
(),
m_metadata_str
.
size
());
}
// Send the response. This must always be called, even if the response is empty, as Finished()
// will not be called until the Response has been processed.
// Send the Response
SetResponse
(
m_response_str
.
c_str
(),
m_response_str
.
size
());
if
(
m_response_str
.
size
()
==
0
)
{
// Send a metadata-only response. If the Response is empty, we still have to call SetResponse(),
// otherwise Finished() will not be called on the Request.
SetNilResponse
();
}
else
{
SetResponse
(
m_response_str
.
c_str
(),
m_response_str
.
size
());
}
// Wait for the framework to call Finished()
...
...
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