Skip to content

Commit

Permalink
Fixes crashes in the duffer append code.
Browse files Browse the repository at this point in the history
  • Loading branch information
balazsracz committed Jul 13, 2024
1 parent 90ce34c commit bb31bbc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/openlcb/BLEHubPort.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ protected:
}
{
AtomicHolder h(this);
HASSERT(transferBuf_.try_append_from(appendBuf_));
HASSERT(transferBuf_.try_append_from(appendBuf_, true));
if (flowWaiting_) {
flowWaiting_ = false;
notify();
Expand All @@ -371,7 +371,7 @@ protected:
/// the hub.
Action take_input() {
AtomicHolder h(this);
HASSERT(segmentBuf_.try_append_from(transferBuf_));
HASSERT(segmentBuf_.try_append_from(transferBuf_, true));
transferBuf_.data_read_advance(transferBuf_.size());
return call_immediately(STATE(segment_head));
}
Expand All @@ -398,7 +398,7 @@ protected:
LinkedDataBufferPtr p;
p.reset(segmentBuf_, xfer);
segmentBuf_.data_read_advance(xfer);
HASSERT(outputBuf_.try_append_from(p));
HASSERT(outputBuf_.try_append_from(p, true));
if (segment_size) {
segmenter_->clear();
// completed data
Expand Down

0 comments on commit bb31bbc

Please sign in to comment.