diff --git a/src/detect-byte-extract.c b/src/detect-byte-extract.c index 7140ed41a5..5743803d44 100644 --- a/src/detect-byte-extract.c +++ b/src/detect-byte-extract.c @@ -649,7 +649,7 @@ int DetectByteExtractSetup(DetectEngineCtx *de_ctx, Signature *s, char *arg) } int list = SigMatchListSMBelongsTo(s, pm); if (list == DETECT_SM_LIST_UMATCH) - SigMatchAppendUricontent(s,sm); + SigMatchAppendSMToList(s, sm, DETECT_SM_LIST_UMATCH); else SigMatchAppendPayload(s, sm); } else { diff --git a/src/detect-parse.c b/src/detect-parse.c index 1fff1f1a6c..5918c4e71a 100644 --- a/src/detect-parse.c +++ b/src/detect-parse.c @@ -173,29 +173,6 @@ void SigMatchAppendSMToList(Signature *s, SigMatch *new, int list) s->sm_cnt++; } -/** - * \brief append a SigMatch of type uricontent to the Signature structure - * \param s pointer to the Signature - * \param new pointer to the SigMatch of type uricontent to be appended - */ -void SigMatchAppendUricontent(Signature *s, SigMatch *new) { - if (s->sm_lists[DETECT_SM_LIST_UMATCH] == NULL) { - s->sm_lists[DETECT_SM_LIST_UMATCH] = new; - s->sm_lists_tail[DETECT_SM_LIST_UMATCH] = new; - new->next = NULL; - new->prev = NULL; - } else { - SigMatch *cur = s->sm_lists_tail[DETECT_SM_LIST_UMATCH]; - cur->next = new; - new->prev = cur; - new->next = NULL; - s->sm_lists_tail[DETECT_SM_LIST_UMATCH] = new; - } - - new->idx = s->sm_cnt; - s->sm_cnt++; -} - void SigMatchAppendPayload(Signature *s, SigMatch *new) { if (s->sm_lists[DETECT_SM_LIST_PMATCH] == NULL) { s->sm_lists[DETECT_SM_LIST_PMATCH] = new; diff --git a/src/detect-parse.h b/src/detect-parse.h index 534bf6656e..b9c40fc3fc 100644 --- a/src/detect-parse.h +++ b/src/detect-parse.h @@ -62,7 +62,6 @@ void SigMatchAppendDcePayload(Signature *, SigMatch *); void SigMatchAppendPacket(Signature *, SigMatch *); void SigMatchAppendThreshold(Signature *, SigMatch *); void SigMatchAppendPostMatch(Signature *, SigMatch *); -void SigMatchAppendUricontent(Signature *, SigMatch *); void SigMatchAppendTag(Signature *, SigMatch *); void SigMatchAppendSMToList(Signature *, SigMatch *, int); void SigMatchRemoveSMFromList(Signature *, SigMatch *, int); diff --git a/src/detect-pcre.c b/src/detect-pcre.c index 714c9b7681..3145e5752d 100644 --- a/src/detect-pcre.c +++ b/src/detect-pcre.c @@ -1130,7 +1130,7 @@ static int DetectPcreSetup (DetectEngineCtx *de_ctx, Signature *s, char *regexst s->alproto = ALPROTO_HTTP; - SigMatchAppendUricontent(s, sm); + SigMatchAppendSMToList(s, sm, DETECT_SM_LIST_UMATCH); } else if (pd->flags & DETECT_PCRE_HTTP_RAW_URI) { s->flags |= SIG_FLAG_APPLAYER; if (s->alproto != ALPROTO_UNKNOWN && s->alproto != ALPROTO_HTTP) { diff --git a/src/detect-uricontent.c b/src/detect-uricontent.c index f8f6cdb297..39b64b8425 100644 --- a/src/detect-uricontent.c +++ b/src/detect-uricontent.c @@ -387,7 +387,7 @@ int DetectUricontentSetup (DetectEngineCtx *de_ctx, Signature *s, char *contents s->alproto = ALPROTO_HTTP; - SigMatchAppendUricontent(s,sm); + SigMatchAppendSMToList(s, sm, DETECT_SM_LIST_UMATCH); SCReturnInt(0);