Skip to content

Commit

Permalink
[SSI] Change GetResponseData() to return void not enum (breaks ABI).
Browse files Browse the repository at this point in the history
  • Loading branch information
abh3 authored and simonmichal committed Dec 10, 2018
1 parent 5502cae commit c0ee7d9
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 388 deletions.
1 change: 0 additions & 1 deletion src/XrdSsi.cmake
Expand Up @@ -31,7 +31,6 @@ XrdSsi/XrdSsiCms.cc XrdSsi/XrdSsiCms.hh
XrdSsi/XrdSsiEvent.cc XrdSsi/XrdSsiEvent.hh
XrdSsi/XrdSsiFileResource.cc XrdSsi/XrdSsiFileResource.hh
XrdSsi/XrdSsiLogger.cc XrdSsi/XrdSsiLogger.hh
XrdSsi/XrdSsiPacer.cc XrdSsi/XrdSsiPacer.hh
XrdSsi/XrdSsiProvider.hh
XrdSsi/XrdSsiRRAgent.hh
XrdSsi/XrdSsiRRInfo.hh
Expand Down
174 changes: 0 additions & 174 deletions src/XrdSsi/XrdSsiPacer.cc

This file was deleted.

88 changes: 0 additions & 88 deletions src/XrdSsi/XrdSsiPacer.hh

This file was deleted.

16 changes: 0 additions & 16 deletions src/XrdSsi/XrdSsiRequest.cc
Expand Up @@ -31,7 +31,6 @@
#include <stdlib.h>
#include <string.h>

#include "XrdSsi/XrdSsiPacer.hh"
#include "XrdSsi/XrdSsiRespInfo.hh"
#include "XrdSsi/XrdSsiResponder.hh"
#include "XrdSsi/XrdSsiRequest.hh"
Expand Down Expand Up @@ -186,18 +185,3 @@ void XrdSsiRequest::ReleaseRequestBuffer()
XrdSsiMutexMon lck(rrMutex);
RelRequestBuffer();
}

/******************************************************************************/
/* R e s t a r t D a t a R e s p o n s e */
/******************************************************************************/

XrdSsiRequest::RDR_Info XrdSsiRequest::RestartDataResponse
(XrdSsiRequest::RDR_How rhow,
const char *reqid
)
{
RDR_Info rInfo;

XrdSsiPacer::Run(rInfo, rhow, reqid);
return rInfo;
}
61 changes: 2 additions & 59 deletions src/XrdSsi/XrdSsiRequest.hh
Expand Up @@ -193,22 +193,10 @@ virtual bool ProcessResponse(const XrdSsiErrInfo &eInfo,
//! @param blen The number of bytes in buff or an error indication if blen < 0.
//! @param last true This is the last stream segment, no more data remains.
//! @param false More data may remain in the stream.
//! @return One of the enum PRD_Xeq:
//! PRD_Normal - Processing completed normally, continue.
//! PRD_Hold - Processing could not be done now, place request
//! in the global FIFO hold queue and resume when
//! RestartDataResponse() is called.
//! PRD_HoldLcl - Processing could not be done now, place request
//! in the request ID FIFO local queue and resume
//! when RestartDataResponse() is called with the ID
//! that was passed to the this request object
//! constructor.
//-----------------------------------------------------------------------------

enum PRD_Xeq {PRD_Normal = 0, PRD_Hold = 1, PRD_HoldLcl = 2};

virtual PRD_Xeq ProcessResponseData(const XrdSsiErrInfo &eInfo, char *buff,
int blen, bool last) {return PRD_Normal;}
virtual void ProcessResponseData(const XrdSsiErrInfo &eInfo, char *buff,
int blen, bool last) {}

//-----------------------------------------------------------------------------
//! Release the request buffer of the request bound to this object. This method
Expand All @@ -218,51 +206,6 @@ virtual PRD_Xeq ProcessResponseData(const XrdSsiErrInfo &eInfo, char *buff,

void ReleaseRequestBuffer();

//-----------------------------------------------------------------------------
//! Restart a ProcessResponseData() call for a request that was previously held
//! (see return enums on ProcessResponseData method). This is a client-side
//! only call and is ignored server-side. When a data response is restarted,
//! ProcessResponseData() is called again when the same parameters as existed
//! when the call resulted in a hold action.
//!
//! @param rhow An enum (see below) that specifies the action to be taken.
//! RDR_All - runs all queued responses and then deletes the
//! queue identified by reqid, unless it is nil.
//! RDR_Hold - sets the allowed restart count to zero and does
//! not restart any queued responses.
//! RDR_Immed - restarts one response if it is queued. The allowed
//! count is left unchanged.
//! RDR_Query - returns information about the queue but otherwise
//! does not restart any queued responses.
//! RDR_One - Sets the allowed restart count to one. If a
//! response is queued, it is restarted and the count
//! is set to zero.
//! RDR_Post - Adds one to the allowed restart count. If a
//! response is queued, it is restarted and one is
//! subtracted from the allowed restart count.
//!
//! @param reqid Points to the requestID associated with a hold queue. When not
//! specified, then the global queue is used to restart responses.
//! Note that the memory associated with the named queue may be
//! lost if the queue is left with an allowed value > 0.To avoid
//! this issue the call with RDR_All to clean it up when it is no
//! longer needed (this will avoid having hung responses).
//!
//! @return Information about the queue (see struct RDR_Info).
//-----------------------------------------------------------------------------

enum RDR_How {RDR_All=0, RDR_Hold, RDR_Immed, RDR_Query, RDR_One, RDR_Post};

struct RDR_Info{int rCount; //!< Number restarted
int qCount; //!< Number of queued request remaining
int iAllow; //!< Initial value of the allowed restart count
int fAllow; //!< Final value of the allowed restart count

RDR_Info() : rCount(0), qCount(0), iAllow(0), fAllow(0) {}
};

static RDR_Info RestartDataResponse(RDR_How rhow, const char *reqid=0);

//-----------------------------------------------------------------------------
//! Constructor
//!
Expand Down

0 comments on commit c0ee7d9

Please sign in to comment.