From 1d10483021cc6eaa3cc30de7bd518c9606b62e50 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Sat, 18 May 2002 05:05:20 +0000 Subject: Updating existing ignore didn't recompile the regexp. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2812 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/core/ignore.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/ignore.c b/src/core/ignore.c index 96c56d9e..99986dd2 100644 --- a/src/core/ignore.c +++ b/src/core/ignore.c @@ -319,6 +319,7 @@ static void ignore_remove_config(IGNORE_REC *rec) static void ignore_init_rec(IGNORE_REC *rec) { #ifdef HAVE_REGEX_H + if (rec->regexp_compiled) regfree(&rec->preg); rec->regexp_compiled = !rec->regexp || rec->pattern == NULL ? FALSE : regcomp(&rec->preg, rec->pattern, REG_EXTENDED|REG_ICASE|REG_NOSUB) == 0; @@ -368,6 +369,7 @@ void ignore_update_rec(IGNORE_REC *rec) ignores = g_slist_append(ignores, rec); ignore_set_config(rec); + ignore_init_rec(rec); signal_emit("ignore changed", 1, rec); nickmatch_rebuild(nickmatch); } -- cgit v1.2.3