streaming: remove config pointer from struct

pull/8426/head
Victor Julien 2 years ago
parent 53d9a1f39f
commit c79c0ca347

@ -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;
}

@ -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;

@ -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_ {

@ -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;

Loading…
Cancel
Save