Skip to content

Commit

Permalink
Revert "[XrdCl] Make sure error message does not include a null-chara…
Browse files Browse the repository at this point in the history
…cter."

This reverts commit 22d308a.
  • Loading branch information
amadio committed Feb 17, 2023
1 parent 1c68330 commit 5a83259
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/XrdCl/XrdClXRootDMsgHandler.cc
Expand Up @@ -1225,9 +1225,7 @@ namespace XrdCl
if( pStatus.code == errErrorResponse )
{
st->errNo = rsp->body.error.errnum;
// omit the last character as the string returned from the server
// (acording to protocol specs) should be null-terminated
std::string errmsg( rsp->body.error.errmsg, rsp->hdr.dlen-5 );
std::string errmsg( rsp->body.error.errmsg, rsp->hdr.dlen-4 );
if( st->errNo == kXR_noReplicas && !pLastError.IsOK() )
errmsg += " Last seen error: " + pLastError.ToString();
st->SetErrorMessage( errmsg );
Expand Down

0 comments on commit 5a83259

Please sign in to comment.