Skip to content

Commit 8d73529

Browse files
committed
Fix bug where CRORC DMA channels would free all PDA buffers
1 parent bce8b4e commit 8d73529

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/DmaChannelBase.cxx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ void DmaChannelBase::freeUnusedChannelBuffer()
7575
for (auto &entry : boost::make_iterator_range(bfs::directory_iterator(dmaPath), {})) {
7676
auto bufferId = entry.path().filename().string();
7777
if (bfs::is_directory(entry)) {
78+
if ((mCardDescriptor.cardType == CardType::Crorc) && (stoi(bufferId) != getChannelNumber())) { // don't free another channel's buffer
79+
continue;
80+
}
7881
std::string mapPath = dmaPath + "/" + bufferId + "/map";
7982
std::string freePath = dmaPath + "/free";
8083
logger << "Freeing PDA buffer '" + mapPath + "'" << InfoLogger::InfoLogger::endm;

0 commit comments

Comments
 (0)