{
uint32_t i;
uint32_t temp_alprotos_buf[ALPROTO_MAX];
+ memset(temp_alprotos_buf, 0, sizeof(temp_alprotos_buf));
printf("=========Supported App Layer Protocols=========\n");
return 0xFFFF;
else
return csum_u16;
-
- return (uint16_t)~csum;
}
StreamTcpReassembleHandleSegment(stream_pseudo_pkt_stream_TV,
stt->ra_ctx, ssn, &ssn->server,
reassemble_p, NULL);
- StreamTcpReassembleProcessAppLayer(stt->ra_ctx);
+ if (StreamTcpReassembleProcessAppLayer(stt->ra_ctx) < 0) {
+ SCLogDebug("shutdown flow timeout "
+ "StreamTcpReassembleProcessAppLayer() erroring "
+ "over something");
+ }
}
/* oh oh! We have some unattended toclient segments */
if ((server_ok = StreamHasUnprocessedSegments(ssn, 1)) == 1) {
StreamTcpReassembleHandleSegment(stream_pseudo_pkt_stream_TV,
stt->ra_ctx, ssn, &ssn->client,
reassemble_p, NULL);
- StreamTcpReassembleProcessAppLayer(stt->ra_ctx);
+ if (StreamTcpReassembleProcessAppLayer(stt->ra_ctx) < 0) {
+ SCLogDebug("shutdown flow timeout "
+ "StreamTcpReassembleProcessAppLayer() erroring "
+ "over something");
+ }
}
if (ssn->state >= TCP_ESTABLISHED && ssn->state != TCP_CLOSED)
filename = DEFAULT_LOG_FILENAME;
if ((pl->prefix = SCStrdup(filename)) == NULL) {
- SCLogError(SC_ERR_MEM_ALLOC, "Error allocating memory for directory name");
- return NULL;
+ exit(EXIT_FAILURE);
}
pl->size_limit = DEFAULT_LIMIT;
static void PcapLogFileDeInitCtx(OutputCtx *output_ctx)
{
+ if (output_ctx == NULL)
+ return;
+
PcapLogData *pl = output_ctx->data;
PcapFileName *pf = NULL;
SCLogDebug("PCAP files left at exit: %s\n", pf->filename);
}
- if (output_ctx != NULL) {
- SCFree(output_ctx);
- }
-
return;
}
if (ctx->queues == NULL) {
ctx->size = 1;
ctx->queues = SCMalloc(ctx->size * sizeof(TmqhFlowMode));
- memset(ctx->queues, 0, ctx->size * sizeof(TmqhFlowMode));
if (ctx->queues == NULL) {
return -1;
}
+ memset(ctx->queues, 0, ctx->size * sizeof(TmqhFlowMode));
} else {
ctx->size++;
ctx->queues = SCRealloc(ctx->queues, ctx->size * sizeof(TmqhFlowMode));