diff --git a/src/stream-tcp-util.c b/src/stream-tcp-util.c index 6565e295a0..4d8bf8a893 100644 --- a/src/stream-tcp-util.c +++ b/src/stream-tcp-util.c @@ -63,7 +63,7 @@ void StreamTcpUTSetupSession(TcpSession *ssn) { memset(ssn, 0x00, sizeof(TcpSession)); - StreamingBuffer x = STREAMING_BUFFER_INITIALIZER(&stream_config.sbcnf); + StreamingBuffer x = STREAMING_BUFFER_INITIALIZER; ssn->client.sb = x; ssn->server.sb = x; } @@ -84,7 +84,7 @@ void StreamTcpUTSetupStream(TcpStream *s, uint32_t isn) STREAMTCP_SET_RA_BASE_SEQ(s, isn); s->base_seq = isn+1; - StreamingBuffer x = STREAMING_BUFFER_INITIALIZER(&stream_config.sbcnf); + StreamingBuffer x = STREAMING_BUFFER_INITIALIZER; s->sb = x; } diff --git a/src/stream-tcp.c b/src/stream-tcp.c index c4356a3bf2..0e5d3f4758 100644 --- a/src/stream-tcp.c +++ b/src/stream-tcp.c @@ -735,7 +735,7 @@ static TcpSession *StreamTcpNewSession(ThreadVars *tv, StreamTcpThread *stt, Pac ssn->server.flags = stream_config.stream_init_flags; ssn->client.flags = stream_config.stream_init_flags; - StreamingBuffer x = STREAMING_BUFFER_INITIALIZER(&stream_config.sbcnf); + StreamingBuffer x = STREAMING_BUFFER_INITIALIZER; ssn->client.sb = x; ssn->server.sb = x; diff --git a/src/util-streaming-buffer.h b/src/util-streaming-buffer.h index 263a45de15..a4d1ed9e1f 100644 --- a/src/util-streaming-buffer.h +++ b/src/util-streaming-buffer.h @@ -107,7 +107,6 @@ RB_PROTOTYPE(SBB, StreamingBufferBlock, rb, SBBCompare); StreamingBufferBlock *SBB_RB_FIND_INCLUSIVE(struct SBB *head, StreamingBufferBlock *elm); typedef struct StreamingBuffer_ { - const StreamingBufferConfig *cfg; StreamingBufferRegion region; struct SBB sbb_tree; /**< red black tree of Stream Buffer Blocks */ StreamingBufferBlock *head; /**< head, should always be the same as RB_MIN */ @@ -136,9 +135,8 @@ static inline uint64_t StreamingBufferGetOffset(const StreamingBuffer *sb) } #ifndef DEBUG -#define STREAMING_BUFFER_INITIALIZER(cfg) \ +#define STREAMING_BUFFER_INITIALIZER \ { \ - (cfg), \ STREAMING_BUFFER_REGION_INIT, \ { NULL }, \ NULL, \ @@ -147,8 +145,7 @@ static inline uint64_t StreamingBufferGetOffset(const StreamingBuffer *sb) 1, \ }; #else -#define STREAMING_BUFFER_INITIALIZER(cfg) \ - { (cfg), STREAMING_BUFFER_REGION_INIT, { NULL }, NULL, 0, 1, 1, 0 }; +#define STREAMING_BUFFER_INITIALIZER { STREAMING_BUFFER_REGION_INIT, { NULL }, NULL, 0, 1, 1, 0 }; #endif typedef struct StreamingBufferSegment_ { diff --git a/src/util-unittest-helper.c b/src/util-unittest-helper.c index f19372bc86..3d183a6ec9 100644 --- a/src/util-unittest-helper.c +++ b/src/util-unittest-helper.c @@ -557,7 +557,7 @@ int UTHAddSessionToFlow(Flow *f, TcpSession *ssn = SCCalloc(1, sizeof(*ssn)); FAIL_IF_NULL(ssn); - StreamingBuffer x = STREAMING_BUFFER_INITIALIZER(&stream_config.sbcnf); + StreamingBuffer x = STREAMING_BUFFER_INITIALIZER; ssn->client.sb = x; ssn->server.sb = x;