-// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2024 CEA, EDF, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
fileTransfer_i::fileTransfer_i()
{
- MESSAGE("fileTransfer_i::fileTransfer_i");
_fileKey=1;
}
fileTransfer_i::~fileTransfer_i()
{
- MESSAGE("fileTransfer_i::~fileTransfer_i");
}
*
* CORBA method: try to open the file. If the file is readable, return
* a positive integer else return 0;
- * \param fileName path to the file to be transfered
+ * \param fileName path to the file to be transferred
* \return fileId = positive integer > 0 if open OK.
*/
//=============================================================================
CORBA::Long fileTransfer_i::open(const char* fileName)
{
- MESSAGE(" fileTransfer_i::open " << fileName);
int aKey = _fileKey++;
_ctr=0;
FILE* fp;
void fileTransfer_i::close(CORBA::Long fileId)
{
- MESSAGE("fileTransfer_i::close");
FILE* fp;
if (! (fp = _fileAccess[fileId]) )
{
Engines::fileBlock* fileTransfer_i::getBlock(CORBA::Long fileId)
{
- MESSAGE("fileTransfer_i::getBlock");
Engines::fileBlock* aBlock = new Engines::fileBlock;
FILE* fp;
CORBA::Octet *buf;
buf = Engines::fileBlock::allocbuf(FILEBLOCK_SIZE);
- int nbRed = fread(buf, sizeof(CORBA::Octet), FILEBLOCK_SIZE, fp);
- SCRUTE(nbRed);
- aBlock->replace(nbRed, nbRed, buf, 1); // 1 means give ownership
+ size_t nbRed = fread(buf, sizeof(CORBA::Octet), FILEBLOCK_SIZE, fp);
+ //SCRUTE(nbRed);
+ aBlock->replace((CORBA::ULong)nbRed, (CORBA::ULong)nbRed, buf, 1); // 1 means give ownership
return aBlock;
}
*
* CORBA method: try to open the file. If the file is writable,
* return a positive integer else return 0;
- * \param fileName path to the file to be transfered
+ * \param fileName path to the file to be transferred
* \return fileId = positive integer > 0 if open OK.
*/
CORBA::Long fileTransfer_i::openW(const char* fileName)
{
- MESSAGE(" fileTransfer_i::openW " << fileName);
int aKey = _fileKey++;
_ctr=0;
FILE* fp;
*/
void fileTransfer_i::putBlock(CORBA::Long fileId, const Engines::fileBlock& block)
{
- MESSAGE("fileTransfer_i::putBlock");
FILE* fp;
if (! (fp = _fileAccess[fileId]) )
{