flowvar: remove unused DETECT_VAR_TYPE_ALWAYS

pull/2559/head
Victor Julien 9 years ago
parent 71607c905a
commit f0af133c5f

@ -339,10 +339,9 @@ static int DetectFlowvarPostMatch(ThreadVars *tv,
return 1;
}
/** \brief Handle flowvar candidate list in det_ctx:
* - clean up the list
* - enforce storage for type ALWAYS (vars set from lua)
* Only called from DetectFlowvarProcessList() when flowvarlist is not NULL .
/** \brief Handle flowvar candidate list in det_ctx: clean up the list
*
* Only called from DetectVarProcessList() when varlist is not NULL.
*/
void DetectVarProcessListInternal(DetectVarList *fs, Flow *f, Packet *p)
{
@ -351,16 +350,10 @@ void DetectVarProcessListInternal(DetectVarList *fs, Flow *f, Packet *p)
do {
next = fs->next;
if (fs->type == DETECT_VAR_TYPE_ALWAYS) {
SCLogDebug("adding to the flow %u:", fs->idx);
//PrintRawDataFp(stdout, fs->buffer, fs->len);
FlowVarAddStrNoLock(f, fs->idx, fs->buffer, fs->len);
/* memory at fs->buffer is now the responsibility of
* the flowvar code. */
} else {
SCFree(fs->buffer);
if (fs->key) {
SCFree(fs->key);
}
SCFree(fs->buffer);
SCFree(fs);
fs = next;
} while (fs != NULL);

@ -492,8 +492,6 @@ typedef struct DetectReplaceList_ {
/** only execute flowvar storage if rule matched */
#define DETECT_VAR_TYPE_FLOW_POSTMATCH 1
#define DETECT_VAR_TYPE_PKT_POSTMATCH 2
/** execute flowvar storage even if rule doesn't match (for lua) */
#define DETECT_VAR_TYPE_ALWAYS 3
/** list for flowvar store candidates, to be stored from
* post-match function */

Loading…
Cancel
Save