rxr: remove file buffering

This commit is contained in:
2020-01-28 13:55:44 +01:00
parent c42b4b8c0e
commit af2f2708ad
2 changed files with 4 additions and 5 deletions

View File

@ -196,10 +196,9 @@ class BinaryFileStatic {
* @param fd file pointer
* @param owenable overwrite enable
* @param fname complete file name
* @param filebuffersize file buffer size
* @returns 0 for success and 1 for fail
*/
static void CreateDataFile(FILE*& fd, bool owenable, std::string fname, size_t filebuffersize)
static void CreateDataFile(FILE*& fd, bool owenable, std::string fname)
{
if(!owenable){
if (NULL == (fd = fopen((const char *) fname.c_str(), "wx"))){
@ -210,8 +209,8 @@ class BinaryFileStatic {
fd = 0;
throw sls::RuntimeError("Could not create file " + fname);
}
//setting file buffer size to 16mb
setvbuf(fd,NULL,_IOFBF,filebuffersize);
//setting to no file buffering
setvbuf(fd, NULL, _IONBF, 0);
}
};