Changeset 17017
- Timestamp:
- 08/19/13 13:05:59 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fact/Evidence/History.cc
r12940 r17017 31 31 const int MIN_SIZE_KB = 50; // Min and max buffersize in kByte (> 3*sizeof(int) !) 32 32 const string DEFAULT_MAX_SIZE_KB = "2000"; 33 const string DEFAULT_NUM_ENTRIES = "1000"; // Number of entries in each history buffer33 const string DEFAULT_NUM_ENTRIES = "1000"; // Number of entries in each history buffer 34 34 const double MIN_SAVE_PERDIOD = 0.5; // Minimum period between saving history buffers in hours 35 35 … … 172 172 173 173 // Resize buffer if necessary 174 int NEntries = atoi(GetConfig("numentries").c_str()); 175 if (Map[Service].Buffer.size() < NEntries*I->getSize()) { 176 if (NEntries*I->getSize() < atoi(GetConfig("maxsize_kb").c_str())*1024) { 177 Map[Service].Buffer.resize(NEntries*I->getSize()); 178 } 174 unsigned long TargetSize = atoi(GetConfig("numentries").c_str()) * I->getSize(); 175 176 if (Map[Service].Buffer.size() < TargetSize && TargetSize < atoi(GetConfig("maxsize_kb").c_str())*1024) { 177 Map[Service].Buffer.resize(TargetSize); 179 178 } 180 179
Note:
See TracChangeset
for help on using the changeset viewer.