app-layer: remove version logic

pull/2622/head
Victor Julien 9 years ago
parent a56b4817ef
commit e24eb0f2b1

@ -136,8 +136,6 @@ typedef struct AppLayerParserCtx_ {
struct AppLayerParserState_ {
uint8_t flags;
/* State version, incremented for each update. Can wrap around. */
uint8_t version;
/* Indicates the current transaction that is being inspected.
* We have a var per direction. */
uint64_t inspect_id[2];
@ -682,12 +680,6 @@ AppLayerDecoderEvents *AppLayerParserGetEventsByTx(uint8_t ipproto, AppProto alp
SCReturnPtr(ptr, "AppLayerDecoderEvents *");
}
uint16_t AppLayerParserGetStateVersion(AppLayerParserState *pstate)
{
SCEnter();
SCReturnCT((pstate == NULL) ? 0 : pstate->version, "uint8_t");
}
FileContainer *AppLayerParserGetFiles(uint8_t ipproto, AppProto alproto,
void *alstate, uint8_t direction)
{
@ -969,9 +961,6 @@ int AppLayerParserParse(ThreadVars *tv, AppLayerParserThreadCtx *alp_tctx, Flow
if (pstate == NULL)
goto error;
}
pstate->version++;
SCLogDebug("app layer parser state version incremented to %"PRIu8,
pstate->version);
if (flags & STREAM_EOF)
AppLayerParserStateSetFlag(pstate, APP_LAYER_PARSER_EOF);
@ -1074,9 +1063,6 @@ void AppLayerParserSetEOF(AppLayerParserState *pstate)
goto end;
AppLayerParserStateSetFlag(pstate, APP_LAYER_PARSER_EOF);
/* increase version so we will inspect it one more time
* with the EOF flags now set */
pstate->version++;
end:
SCReturn;
@ -1304,10 +1290,9 @@ void AppLayerParserStatePrintDetails(AppLayerParserState *pstate)
"p->inspect_id[0](%"PRIu64"), "
"p->inspect_id[1](%"PRIu64"), "
"p->log_id(%"PRIu64"), "
"p->version(%"PRIu8"), "
"p->decoder_events(%p).",
pstate, p->inspect_id[0], p->inspect_id[1], p->log_id,
p->version, p->decoder_events);
p->decoder_events);
SCReturn;
}

@ -175,7 +175,6 @@ AppLayerDecoderEvents *AppLayerParserGetDecoderEvents(AppLayerParserState *pstat
void AppLayerParserSetDecoderEvents(AppLayerParserState *pstate, AppLayerDecoderEvents *devents);
AppLayerDecoderEvents *AppLayerParserGetEventsByTx(uint8_t ipproto, AppProto alproto, void *alstate,
uint64_t tx_id);
uint16_t AppLayerParserGetStateVersion(AppLayerParserState *pstate);
FileContainer *AppLayerParserGetFiles(uint8_t ipproto, AppProto alproto,
void *alstate, uint8_t direction);
int AppLayerParserGetStateProgress(uint8_t ipproto, AppProto alproto,

Loading…
Cancel
Save