src/fileio.cpp
branchNewGRF_ports
changeset 6743 cabfaa4a0295
parent 6720 35756db7e577
child 6870 ca3fd1fbe311
equal deleted inserted replaced
6742:1337d6c9b97b 6743:cabfaa4a0295
    64 #if defined(LIMITED_FDS)
    64 #if defined(LIMITED_FDS)
    65 static void FioRestoreFile(int slot)
    65 static void FioRestoreFile(int slot)
    66 {
    66 {
    67 	/* Do we still have the file open, or should we reopen it? */
    67 	/* Do we still have the file open, or should we reopen it? */
    68 	if (_fio.handles[slot] == NULL) {
    68 	if (_fio.handles[slot] == NULL) {
    69 		DEBUG(misc, 6, "Restoring file '%s' in slot '%d' from disk", _fio.filename[slot], slot);
    69 		DEBUG(misc, 6, "Restoring file '%s' in slot '%d' from disk", _fio.filenames[slot], slot);
    70 		FioOpenFile(slot, _fio.filename[slot]);
    70 		FioOpenFile(slot, _fio.filenames[slot]);
    71 	}
    71 	}
    72 	_fio.usage_count[slot]++;
    72 	_fio.usage_count[slot]++;
    73 }
    73 }
    74 #endif /* LIMITED_FDS */
    74 #endif /* LIMITED_FDS */
    75 
    75 
   163 				count = _fio.usage_count[i];
   163 				count = _fio.usage_count[i];
   164 				slot  = i;
   164 				slot  = i;
   165 			}
   165 			}
   166 		}
   166 		}
   167 		assert(slot != -1);
   167 		assert(slot != -1);
   168 		DEBUG(misc, 6, "Closing filehandler '%s' in slot '%d' because of fd-limit", _fio.filename[slot], slot);
   168 		DEBUG(misc, 6, "Closing filehandler '%s' in slot '%d' because of fd-limit", _fio.filenames[slot], slot);
   169 		FioCloseFile(slot);
   169 		FioCloseFile(slot);
   170 	}
   170 	}
   171 }
   171 }
   172 #endif /* LIMITED_FDS */
   172 #endif /* LIMITED_FDS */
   173 
   173