From ea771c69afe0557d6aae104a33fe4187a25ae8e7 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Wed, 29 Aug 2018 15:31:39 +0200 Subject: [PATCH] streaming/sbb: convert RB_MIN to 'head' --- src/stream-tcp-reassemble.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/stream-tcp-reassemble.c b/src/stream-tcp-reassemble.c index 08a0e25961..0a2d7b83e1 100644 --- a/src/stream-tcp-reassemble.c +++ b/src/stream-tcp-reassemble.c @@ -896,7 +896,7 @@ static void GetAppBuffer(TcpStream *stream, const uint8_t **data, uint32_t *data *data = mydata; *data_len = mydata_len; } else { - StreamingBufferBlock *blk = RB_MIN(SBB, &stream->sb.sbb_tree); + StreamingBufferBlock *blk = stream->sb.head; if (blk->offset > offset) { SCLogDebug("gap, want data at offset %"PRIu64", " @@ -964,7 +964,7 @@ static inline bool CheckGap(TcpSession *ssn, TcpStream *stream, Packet *p) return false; } else { const uint64_t next_seq_abs = STREAM_BASE_OFFSET(stream) + (stream->next_seq - stream->base_seq); - StreamingBufferBlock *blk = RB_MIN(SBB, &stream->sb.sbb_tree); + const StreamingBufferBlock *blk = stream->sb.head; if (blk->offset > next_seq_abs && blk->offset < last_ack_abs) { /* ack'd data after the gap */ SCLogDebug("packet %"PRIu64": GAP. "