Skip to content

Commit

Permalink
Merge branch 'RALxrdceph' of https://github.com/stfc/xrootd into RALx…
Browse files Browse the repository at this point in the history
…rdceph
  • Loading branch information
Jo-stfc committed Sep 17, 2024
2 parents 9174861 + b4a089b commit 49e9d62
Show file tree
Hide file tree
Showing 86 changed files with 1,385 additions and 917 deletions.
6 changes: 3 additions & 3 deletions bindings/python/src/PyXRootDCopyProcess.cc
Original file line number Diff line number Diff line change
Expand Up @@ -101,15 +101,15 @@ namespace PyXRootD

val = XrdCl::DefaultCPInitTimeout;
env->GetInt( "CPInitTimeout", val );
uint16_t initTimeout = val;
time_t initTimeout = val;

val = XrdCl::DefaultCPTPCTimeout;
env->GetInt( "CPTPCTimeout", val );
uint16_t tpcTimeout = val;
time_t tpcTimeout = val;

val = XrdCl::DefaultCPTimeout;
env->GetInt( "CPTimeout", val );
uint16_t cpTimeout = val;
time_t cpTimeout = val;

if ( !PyArg_ParseTupleAndKeywords( args, kwds, "ss|HbbbbssssbIHHHbHLLLbs:add_job",
(char**) kwlist,
Expand Down
10 changes: 5 additions & 5 deletions bindings/python/src/PyXRootDCopyProgressHandler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ namespace PyXRootD
//----------------------------------------------------------------------------
// Notify when a new job is about to start
//----------------------------------------------------------------------------
void CopyProgressHandler::BeginJob( uint16_t jobNum,
uint16_t jobTotal,
void CopyProgressHandler::BeginJob( uint32_t jobNum,
uint32_t jobTotal,
const XrdCl::URL *source,
const XrdCl::URL *target )
{
Expand All @@ -54,7 +54,7 @@ namespace PyXRootD
//----------------------------------------------------------------------------
// Notify when the previous job has finished
//----------------------------------------------------------------------------
void CopyProgressHandler::EndJob( uint16_t jobNum,
void CopyProgressHandler::EndJob( uint32_t jobNum,
const XrdCl::PropertyList *result )
{
PyGILState_STATE state = PyGILState_Ensure();
Expand All @@ -74,7 +74,7 @@ namespace PyXRootD
//----------------------------------------------------------------------------
// Notify about the progress of the current job
//----------------------------------------------------------------------------
void CopyProgressHandler::JobProgress( uint16_t jobNum,
void CopyProgressHandler::JobProgress( uint32_t jobNum,
uint64_t bytesProcessed,
uint64_t bytesTotal )
{
Expand All @@ -93,7 +93,7 @@ namespace PyXRootD
//----------------------------------------------------------------------------
// Check if the job should be canceled
//----------------------------------------------------------------------------
bool CopyProgressHandler::ShouldCancel( uint16_t jobNum )
bool CopyProgressHandler::ShouldCancel( uint32_t jobNum )
{
PyGILState_STATE state = PyGILState_Ensure();
bool ret = false;
Expand Down
10 changes: 5 additions & 5 deletions bindings/python/src/PyXRootDCopyProgressHandler.hh
Original file line number Diff line number Diff line change
Expand Up @@ -46,28 +46,28 @@ namespace PyXRootD
//------------------------------------------------------------------------
//! Notify when a new job is about to start
//------------------------------------------------------------------------
virtual void BeginJob( uint16_t jobNum,
uint16_t jobTotal,
virtual void BeginJob( uint32_t jobNum,
uint32_t jobTotal,
const XrdCl::URL *source,
const XrdCl::URL *target );

//------------------------------------------------------------------------
//! Notify when the previous job has finished
//------------------------------------------------------------------------
virtual void EndJob( uint16_t jobNum,
virtual void EndJob( uint32_t jobNum,
const XrdCl::PropertyList *result );

//------------------------------------------------------------------------
//! Notify about the progress of the current job
//------------------------------------------------------------------------
virtual void JobProgress( uint16_t jobNum,
virtual void JobProgress( uint32_t jobNum,
uint64_t bytesProcessed,
uint64_t bytesTotal );

//------------------------------------------------------------------------
//! Determine whether the job should be canceled
//------------------------------------------------------------------------
virtual bool ShouldCancel(uint16_t jobNum);
virtual bool ShouldCancel(uint32_t jobNum);

public:
PyObject *handler;
Expand Down
52 changes: 26 additions & 26 deletions bindings/python/src/PyXRootDFile.cc
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ namespace PyXRootD
const char *url;
XrdCl::OpenFlags::Flags flags = XrdCl::OpenFlags::None;
XrdCl::Access::Mode mode = XrdCl::Access::None;
uint16_t timeout = 0;
time_t timeout = 0;
PyObject *callback = NULL, *pystatus = NULL;
XrdCl::XRootDStatus status;

Expand Down Expand Up @@ -75,7 +75,7 @@ namespace PyXRootD
PyObject* File::Close( File *self, PyObject *args, PyObject *kwds )
{
static const char *kwlist[] = { "timeout", "callback", NULL };
uint16_t timeout = 0;
time_t timeout = 0;
PyObject *callback = NULL, *pystatus = NULL;
XrdCl::XRootDStatus status;

Expand Down Expand Up @@ -107,7 +107,7 @@ namespace PyXRootD
{
static const char *kwlist[] = { "force", "timeout", "callback", NULL };
int force = 0;
uint16_t timeout = 0;
time_t timeout = 0;
PyObject *callback = NULL, *pyresponse = NULL, *pystatus = NULL;
XrdCl::XRootDStatus status;

Expand Down Expand Up @@ -146,7 +146,7 @@ namespace PyXRootD
NULL };
uint64_t offset = 0;
uint32_t size = 0;
uint16_t timeout = 0;
time_t timeout = 0;
PyObject *callback = NULL, *pystatus = NULL, *pyresponse = NULL;
PyObject *py_offset = NULL, *py_size = NULL, *py_timeout = NULL;
char *buffer = 0;
Expand All @@ -159,20 +159,20 @@ namespace PyXRootD

unsigned long long tmp_offset = 0;
unsigned int tmp_size = 0;
unsigned short int tmp_timeout = 0;
unsigned int tmp_timeout = 0;

if ( py_offset && PyObjToUllong( py_offset, &tmp_offset, "offset" ) )
return NULL;

if ( py_size && PyObjToUint(py_size, &tmp_size, "size" ) )
return NULL;

if ( py_timeout && PyObjToUshrt(py_timeout, &tmp_timeout, "timeout" ) )
if ( py_timeout && PyObjToUint(py_timeout, &tmp_timeout, "timeout" ) )
return NULL;

offset = (uint64_t)tmp_offset;
size = (uint32_t)tmp_size;
timeout = (uint16_t)tmp_timeout;
timeout = (time_t)tmp_timeout;

if (!size) {
XrdCl::StatInfo *info = 0;
Expand Down Expand Up @@ -426,7 +426,7 @@ namespace PyXRootD
Py_ssize_t buffsize;
uint64_t offset = 0;
uint32_t size = 0;
uint16_t timeout = 0;
time_t timeout = 0;
PyObject *callback = NULL, *pystatus = NULL;
PyObject *py_offset = NULL, *py_size = NULL, *py_timeout = NULL;
XrdCl::XRootDStatus status;
Expand All @@ -439,20 +439,20 @@ namespace PyXRootD

unsigned long long tmp_offset = 0;
unsigned int tmp_size = 0;
unsigned short int tmp_timeout = 0;
unsigned int tmp_timeout = 0;

if (py_offset && PyObjToUllong(py_offset, &tmp_offset, "offset"))
return NULL;

if (py_size && PyObjToUint(py_size, &tmp_size, "size"))
return NULL;

if (py_timeout && PyObjToUshrt(py_timeout, &tmp_timeout, "timeout"))
if (py_timeout && PyObjToUint(py_timeout, &tmp_timeout, "timeout"))
return NULL;

offset = (uint64_t)tmp_offset;
size = (uint32_t)tmp_size;
timeout = (uint16_t)tmp_timeout;
timeout = (time_t)tmp_timeout;

if (!size) {
size = buffsize;
Expand Down Expand Up @@ -482,7 +482,7 @@ namespace PyXRootD
PyObject* File::Sync( File *self, PyObject *args, PyObject *kwds )
{
static const char *kwlist[] = { "timeout", "callback", NULL };
uint16_t timeout = 0;
time_t timeout = 0;
PyObject *callback = NULL, *pystatus = NULL;
XrdCl::XRootDStatus status;

Expand Down Expand Up @@ -515,7 +515,7 @@ namespace PyXRootD
{
static const char *kwlist[] = { "size", "timeout", "callback", NULL };
uint64_t size;
uint16_t timeout = 0;
time_t timeout = 0;
PyObject *callback = NULL, *pystatus = NULL;
PyObject *py_size = NULL, *py_timeout = NULL;
XrdCl::XRootDStatus status;
Expand All @@ -526,16 +526,16 @@ namespace PyXRootD
(char**) kwlist, &py_size, &py_timeout, &callback ) ) return NULL;

unsigned long long tmp_size = 0;
unsigned short int tmp_timeout = 0;
unsigned int tmp_timeout = 0;

if ( py_size && PyObjToUllong( py_size, &tmp_size, "size" ) )
return NULL;

if ( py_timeout && PyObjToUshrt( py_timeout, &tmp_timeout, "timeout" ) )
if ( py_timeout && PyObjToUint( py_timeout, &tmp_timeout, "timeout" ) )
return NULL;

size = (uint64_t)tmp_size;
timeout = (uint16_t)tmp_timeout;
timeout = (time_t)tmp_timeout;

if ( callback && callback != Py_None ) {
XrdCl::ResponseHandler *handler = GetHandler<XrdCl::AnyObject>( callback );
Expand All @@ -561,7 +561,7 @@ namespace PyXRootD
PyObject* File::VectorRead( File *self, PyObject *args, PyObject *kwds )
{
static const char *kwlist[] = { "chunks", "timeout", "callback", NULL };
uint16_t timeout = 0;
time_t timeout = 0;
uint64_t offset = 0;
uint32_t length = 0;
PyObject *pychunks = NULL, *callback = NULL;
Expand All @@ -574,12 +574,12 @@ namespace PyXRootD
if ( !PyArg_ParseTupleAndKeywords( args, kwds, "O|OO:vector_read",
(char**) kwlist, &pychunks, &py_timeout, &callback ) ) return NULL;

unsigned short int tmp_timeout = 0;
unsigned int tmp_timeout = 0;

if ( py_timeout && PyObjToUshrt( py_timeout, &tmp_timeout, "timeout" ) )
if ( py_timeout && PyObjToUint( py_timeout, &tmp_timeout, "timeout" ) )
return NULL;

timeout = (uint16_t)tmp_timeout;
timeout = (time_t)tmp_timeout;

if ( !PyList_Check( pychunks ) ) {
PyErr_SetString( PyExc_TypeError, "chunks parameter must be a list" );
Expand Down Expand Up @@ -654,7 +654,7 @@ namespace PyXRootD
static const char *kwlist[] = { "arg", "timeout", "callback", NULL };
const char *buffer = 0;
Py_ssize_t buffSize = 0;
uint16_t timeout = 0;
time_t timeout = 0;
PyObject *callback = NULL, *pystatus = NULL, *pyresponse = NULL;
XrdCl::XRootDStatus status;

Expand Down Expand Up @@ -696,7 +696,7 @@ namespace PyXRootD
PyObject* File::Visa( File *self, PyObject *args, PyObject *kwds )
{
static const char *kwlist[] = { "timeout", "callback", NULL };
uint16_t timeout = 0;
time_t timeout = 0;
PyObject *callback = NULL, *pystatus = NULL, *pyresponse = NULL;
XrdCl::XRootDStatus status;

Expand Down Expand Up @@ -782,7 +782,7 @@ namespace PyXRootD
static const char *kwlist[] = { "attrs", "timeout", "callback", NULL };

std::vector<XrdCl::xattr_t> attrs;
uint16_t timeout = 0;
time_t timeout = 0;

PyObject *callback = NULL, *pystatus = NULL;
PyObject *pyattrs = NULL, *pyresponse = NULL;
Expand Down Expand Up @@ -853,7 +853,7 @@ namespace PyXRootD
static const char *kwlist[] = { "attrs", "timeout", "callback", NULL };

std::vector<std::string> attrs;
uint16_t timeout = 0;
time_t timeout = 0;

PyObject *callback = NULL, *pystatus = NULL;
PyObject *pyattrs = NULL, *pyresponse = NULL;
Expand Down Expand Up @@ -912,7 +912,7 @@ namespace PyXRootD
static const char *kwlist[] = { "attrs", "timeout", "callback", NULL };

std::vector<std::string> attrs;
uint16_t timeout = 0;
time_t timeout = 0;

PyObject *callback = NULL, *pystatus = NULL;
PyObject *pyattrs = NULL, *pyresponse = NULL;
Expand Down Expand Up @@ -970,7 +970,7 @@ namespace PyXRootD
{
static const char *kwlist[] = { "timeout", "callback", NULL };

uint16_t timeout = 0;
time_t timeout = 0;

PyObject *callback = NULL, *pystatus = NULL;
PyObject *pyresponse = NULL;
Expand Down
Loading

0 comments on commit 49e9d62

Please sign in to comment.