dcsctp: Add consistency check for assembled msgs
The buffer of reassembled messages in ReassemblyQueue is only to be used while processing a DATA/I-DATA or FORWARD-TSN as processing these chunks may result in assembling messages. When the socket is idle - between API calls - it's supposed to be empty. Instead of having it as a member in ReassemblyQueue, it could be provided as an argument to ReassemblyQueue::Add and ReassemblyQueue::Handle(ForwardTSN), but that would be a quite big refactoring. That will be investigated separately. Bug: None Change-Id: I41238de28f32f2a622c1d045debe3ea11e7c23f6 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/232000 Reviewed-by: Florent Castelli <orphis@webrtc.org> Commit-Queue: Victor Boivie <boivie@webrtc.org> Cr-Commit-Position: refs/heads/main@{#35014}
This commit is contained in:

committed by
WebRTC LUCI CQ

parent
fed091edf4
commit
54e4e35c89
@ -184,6 +184,9 @@ std::string DcSctpSocket::log_prefix() const {
|
||||
}
|
||||
|
||||
bool DcSctpSocket::IsConsistent() const {
|
||||
if (tcb_ != nullptr && tcb_->reassembly_queue().HasMessages()) {
|
||||
return false;
|
||||
}
|
||||
switch (state_) {
|
||||
case State::kClosed:
|
||||
return (tcb_ == nullptr && !t1_init_->is_running() &&
|
||||
|
Reference in New Issue
Block a user