Skip to content

Commit

Permalink
Fix handling of the stream ID for truncate requests.
Browse files Browse the repository at this point in the history
  • Loading branch information
abh3 committed Jun 26, 2014
1 parent c71dd68 commit 2872d74
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
6 changes: 4 additions & 2 deletions src/XrdSsi/XrdSsiFile.cc
Original file line number Diff line number Diff line change
Expand Up @@ -615,10 +615,12 @@ int XrdSsiFile::truncate(XrdSfsFileOffset flen) // In
{case XrdSsiRRInfo::Rwt:
respCB = error.getErrCB(respCBarg);
if (rqstP->WantResponse(respCB, respCBarg))
{DEBUG(reqID <<':' <<gigID <<" resp ready");
{DEBUG(reqID <<':' <<gigID <<" resp ready "
<<hex <<respCBarg <<dec);
return SFS_OK;
}
DEBUG(reqID <<':' <<gigID <<" resp not ready");
DEBUG(reqID <<':' <<gigID <<" resp not ready "
<<hex <<respCBarg <<dec);
error.setErrCB((XrdOucEICB *)rqstP);
return SFS_STARTED;
break;
Expand Down
2 changes: 1 addition & 1 deletion src/XrdSsi/XrdSsiFileReq.cc
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,7 @@ void XrdSsiFileReq::WakeUp() // Called with myMutex locked!

// Do some debugging
//
DEBUGXQ("");
DEBUGXQ("respCBarg=" <<hex <<respCBarg <<dec);

// Tell the client to issue a read now. We don't need a callback on this so
// the callback handler will delete the errinfo object for us.
Expand Down
3 changes: 2 additions & 1 deletion src/XrdXrootd/XrdXrootdProtocol.cc
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,8 @@ int XrdXrootdProtocol::Process2()
case kXR_sync: ReqID.setID(Request.header.streamid);
return do_Sync();
case kXR_close: return do_Close();
case kXR_truncate: if (!Request.header.dlen) return do_Truncate();
case kXR_truncate: ReqID.setID(Request.header.streamid);
if (!Request.header.dlen) return do_Truncate();
break;
case kXR_query: if (!Request.header.dlen) return do_Qfh();
default: break;
Expand Down

0 comments on commit 2872d74

Please sign in to comment.