示例#1
0
int
remoteFileFstat (rsComm_t *rsComm, fileFstatInp_t *fileFstatInp,
rodsStat_t **fileFstatOut, rodsServerHost_t *rodsServerHost)
{   
    int status;

    if (rodsServerHost == NULL) {
        rodsLog (LOG_NOTICE,
          "remoteFileFstat: Invalid rodsServerHost");
        return SYS_INVALID_SERVER_HOST;
    }

    if ((status = svrToSvrConnect (rsComm, rodsServerHost)) < 0) {
        return status;
    }


    fileFstatInp->fileInx = convL3descInx (fileFstatInp->fileInx);
    status = rcFileFstat (rodsServerHost->conn, fileFstatInp, fileFstatOut);

    if (status < 0) { 
        rodsLog (LOG_NOTICE,
         "remoteFileFstat: rcFileFstat failed for %s",
          FileDesc[fileFstatInp->fileInx].fileName);
    }

    return status;
}
示例#2
0
int
remoteFileWrite (rsComm_t *rsComm, fileWriteInp_t *fileWriteInp, 
bytesBuf_t *fileWriteInpBBuf, rodsServerHost_t *rodsServerHost)
{
    int retVal;

    if (rodsServerHost == NULL) {
        rodsLog (LOG_NOTICE,
	  "remoteFileWrite: Invalid rodsServerHost");
        return SYS_INVALID_SERVER_HOST;
    }

    if ((retVal = svrToSvrConnect (rsComm, rodsServerHost)) < 0) {
        return retVal;
    }

    fileWriteInp->fileInx = convL3descInx (fileWriteInp->fileInx);
    retVal = rcFileWrite (rodsServerHost->conn, fileWriteInp, 
      fileWriteInpBBuf);

    if (retVal < 0) { 
        rodsLog (LOG_NOTICE,
	 "remoteFileWrite: rcFileWrite failed for %s",
	  FileDesc[fileWriteInp->fileInx].fileName);
    }

    return retVal;
}
示例#3
0
int
remoteDataCopy( rsComm_t *rsComm, dataCopyInp_t *dataCopyInp,
                rodsServerHost_t *rodsServerHost ) {
    int status;

    if ( rodsServerHost == NULL ) {
        rodsLog( LOG_NOTICE,
                 "remoteDataCopy: Invalid rodsServerHost" );
        return SYS_INVALID_SERVER_HOST;
    }

    if ( ( status = svrToSvrConnect( rsComm, rodsServerHost ) ) < 0 ) {
        return status;
    }

    dataCopyInp->dataOprInp.destL3descInx =
        convL3descInx( dataCopyInp->dataOprInp.destL3descInx );

    status = rcDataCopy( rodsServerHost->conn, dataCopyInp );

    if ( status < 0 ) {
        rodsLog( LOG_NOTICE,
                 "remoteDataCopy: rcDataCopy failed" );
    }

    return status;
}
示例#4
0
int
remoteFileLseek( rsComm_t *rsComm, fileLseekInp_t *fileLseekInp,
                 fileLseekOut_t **fileLseekOut, rodsServerHost_t *rodsServerHost ) {
    int status;

    if ( rodsServerHost == NULL ) {
        rodsLog( LOG_NOTICE,
                 "remoteFileLseek: Invalid rodsServerHost" );
        return SYS_INVALID_SERVER_HOST;
    }

    if ( ( status = svrToSvrConnect( rsComm, rodsServerHost ) ) < 0 ) {
        return status;
    }

    fileLseekInp->fileInx = convL3descInx( fileLseekInp->fileInx );
    status = rcFileLseek( rodsServerHost->conn, fileLseekInp, fileLseekOut );

    if ( status < 0 ) {
        rodsLog( LOG_NOTICE,
                 "remoteFileLseek: rcFileLseek failed for %d, status = %d",
                 fileLseekInp->fileInx, status );
    }

    return status;
}
示例#5
0
int
remoteDataGet( rsComm_t *rsComm, dataOprInp_t *dataOprInp,
               portalOprOut_t **portalOprOut, rodsServerHost_t *rodsServerHost ) {
    int status;

    if ( rodsServerHost == NULL ) {
        rodsLog( LOG_NOTICE,
                 "remoteDataGet: Invalid rodsServerHost" );
        return SYS_INVALID_SERVER_HOST;
    }

    if ( ( status = svrToSvrConnect( rsComm, rodsServerHost ) ) < 0 ) {
        return status;
    }

    dataOprInp->srcL3descInx = convL3descInx( dataOprInp->srcL3descInx );
    status = rcDataGet( rodsServerHost->conn, dataOprInp, portalOprOut );

    return status;
}