mirror of
https://github.com/vel21ripn/nDPI.git
synced 2026-05-06 03:45:32 +00:00
Fixes #845
This commit is contained in:
parent
080e23e30e
commit
90e08b3568
1 changed files with 10 additions and 2 deletions
12
src/lib/third_party/src/ahocorasick.c
vendored
12
src/lib/third_party/src/ahocorasick.c
vendored
|
|
@ -104,9 +104,17 @@ AC_ERROR_t ac_automata_add (AC_AUTOMATA_t * thiz, AC_PATTERN_t * patt)
|
|||
}
|
||||
}
|
||||
|
||||
if(n->final)
|
||||
if(n->final) {
|
||||
#if 0
|
||||
/* Original code */
|
||||
return ACERR_DUPLICATE_PATTERN;
|
||||
|
||||
#else
|
||||
/* ntop */
|
||||
memcpy(&n->matched_patterns->rep, &patt->rep, sizeof(AC_REP_t));
|
||||
return ACERR_SUCCESS;
|
||||
#endif
|
||||
}
|
||||
|
||||
n->final = 1;
|
||||
node_register_matchstr(n, patt, 0);
|
||||
thiz->total_patterns++;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue