git://git.exim.org
/
exim.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9094b84
)
Avoid RE compile unneeded unless LOOKUP_MODULE_DIR defined
author
Jeremy Harris
<jgh146exb@wizmail.org>
Sun, 7 Feb 2016 12:10:14 +0000
(12:10 +0000)
committer
Jeremy Harris
<jgh146exb@wizmail.org>
Wed, 6 Apr 2016 20:25:24 +0000
(21:25 +0100)
src/src/drtables.c
patch
|
blob
|
history
diff --git
a/src/src/drtables.c
b/src/src/drtables.c
index d07123453db79931e029c7744a87a3dc572c09f5..c83012944398c7aca717526dae5579fc5333d2df 100644
(file)
--- a/
src/src/drtables.c
+++ b/
src/src/drtables.c
@@
-524,8
+524,6
@@
init_lookup_list(void)
int moduleerrors = 0;
#endif
struct lookupmodulestr *p;
int moduleerrors = 0;
#endif
struct lookupmodulestr *p;
- const pcre *regex_islookupmod = regex_must_compile(
- US"\\." DYNLIB_FN_EXT "$", FALSE, TRUE);
if (lookup_list_init_done)
return;
if (lookup_list_init_done)
return;
@@
-610,6
+608,9
@@
init_lookup_list(void)
log_write(0, LOG_MAIN, "Couldn't open %s: not loading lookup modules\n", LOOKUP_MODULE_DIR);
}
else {
log_write(0, LOG_MAIN, "Couldn't open %s: not loading lookup modules\n", LOOKUP_MODULE_DIR);
}
else {
+ const pcre *regex_islookupmod = regex_must_compile(
+ US"\\." DYNLIB_FN_EXT "$", FALSE, TRUE);
+
DEBUG(D_lookup) debug_printf("Loading lookup modules from %s\n", LOOKUP_MODULE_DIR);
while ((ent = readdir(dd)) != NULL) {
char *name = ent->d_name;
DEBUG(D_lookup) debug_printf("Loading lookup modules from %s\n", LOOKUP_MODULE_DIR);
while ((ent = readdir(dd)) != NULL) {
char *name = ent->d_name;
@@
-666,14
+667,13
@@
init_lookup_list(void)
countmodules++;
}
}
countmodules++;
}
}
+ store_free((void*)regex_islookupmod);
closedir(dd);
}
DEBUG(D_lookup) debug_printf("Loaded %d lookup modules\n", countmodules);
#endif
closedir(dd);
}
DEBUG(D_lookup) debug_printf("Loaded %d lookup modules\n", countmodules);
#endif
- store_free((void*)regex_islookupmod);
-
DEBUG(D_lookup) debug_printf("Total %d lookups\n", lookup_list_count);
lookup_list = store_malloc(sizeof(lookup_info *) * lookup_list_count);
DEBUG(D_lookup) debug_printf("Total %d lookups\n", lookup_list_count);
lookup_list = store_malloc(sizeof(lookup_info *) * lookup_list_count);