Skip to content

Commit

Permalink
Need to handle all of the regexp engine permutations better.
Browse files Browse the repository at this point in the history
  • Loading branch information
Castaglia committed Aug 14, 2021
1 parent 2b28dcc commit de87f92
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/regexp.c
Original file line number Diff line number Diff line change
Expand Up @@ -612,9 +612,20 @@ int pr_regexp_set_engine(const char *engine) {
* only use POSIX.
*/
if (strcasecmp(engine, "POSIX") == 0) {
if (regexp_use_posix == FALSE) {
pr_trace_msg(trace_channel, 19, "%s",
"changed regexp engine from PCRE to POSIX");
}

regexp_use_posix = TRUE;
pr_trace_msg(trace_channel, 19, "%s",
"changed regexp engine from PCRE to POSIX");

} else {
if (regexp_use_posix == TRUE) {
pr_trace_msg(trace_channel, 19, "%s",
"changed regexp engine from POSIX to PCRE");
}

regexp_use_posix = FALSE;
}
#else
/* We only use POSIX, but are being requested to use PCRE. */
Expand Down

0 comments on commit de87f92

Please sign in to comment.