| 222 | } |
| 223 | |
| 224 | void UncompressedFile::nextLogContainer() { |
| 225 | /* mutex lock */ |
| 226 | std::lock_guard<std::mutex> lock(m_mutex); |
| 227 | |
| 228 | /* find starting log container */ |
| 229 | std::shared_ptr<LogContainer> logContainer = logContainerContaining(m_tellp); |
| 230 | if (logContainer) { |
| 231 | /* offset to write */ |
| 232 | std::streamoff offset = m_tellp - logContainer->filePosition; |
| 233 | |
| 234 | /* resize logContainer, if it's not already a newly created one */ |
| 235 | if (offset > 0) { |
| 236 | logContainer->uncompressedFile.resize(offset); |
| 237 | logContainer->uncompressedFileSize = offset; |
| 238 | } |
| 239 | } |
| 240 | } |
| 241 | |
| 242 | std::streamsize UncompressedFile::fileSize() const { |
| 243 | /* mutex lock */ |