int rsFileGet (rsComm_t *rsComm, fileOpenInp_t *fileGetInp, bytesBuf_t *fileGetOutBBuf) { rodsServerHost_t *rodsServerHost; int remoteFlag; int status; remoteFlag = resolveHost (&fileGetInp->addr, &rodsServerHost); if (remoteFlag == LOCAL_HOST) { status = _rsFileGet (rsComm, fileGetInp, fileGetOutBBuf); } else if (remoteFlag == REMOTE_HOST) { status = remoteFileGet (rsComm, fileGetInp, fileGetOutBBuf, rodsServerHost); } else { if (remoteFlag < 0) { return (remoteFlag); } else { rodsLog (LOG_NOTICE, "rsFileGet: resolveHost returned unrecognized value %d", remoteFlag); return (SYS_UNRECOGNIZED_REMOTE_FLAG); } } return (status); }
int rsFileGet( rsComm_t *rsComm, fileOpenInp_t *fileGetInp, bytesBuf_t *fileGetOutBBuf ) { rodsServerHost_t *rodsServerHost; int remoteFlag; int status; //remoteFlag = resolveHost (&fileGetInp->addr, &rodsServerHost); irods::error ret = irods::get_host_for_hier_string( fileGetInp->resc_hier_, remoteFlag, rodsServerHost ); if ( !ret.ok() ) { irods::log( PASSMSG( "failed in call to irods::get_host_for_hier_string", ret ) ); return -1; } if ( remoteFlag == LOCAL_HOST ) { status = _rsFileGet( rsComm, fileGetInp, fileGetOutBBuf ); } else if ( remoteFlag == REMOTE_HOST ) { status = remoteFileGet( rsComm, fileGetInp, fileGetOutBBuf, rodsServerHost ); } else { if ( remoteFlag < 0 ) { return remoteFlag; } else { rodsLog( LOG_NOTICE, "rsFileGet: resolveHost returned unrecognized value %d", remoteFlag ); return SYS_UNRECOGNIZED_REMOTE_FLAG; } } return status; }