+ strlist_resource_t *res = resource_get("strlist", file);
+ if (res == NULL) {
+ res = p_new(strlist_resource_t, 1);
+ resource_set("strlist", file, res, (resource_destructor_t)strlist_resource_wipe);
+ } else if (res->trie2 != NULL) {
+ err("A file (%s) cannot be used as a rbldns zone file and a strlist file at the same time",
+ file);
+ resource_release("strlist", file);
+ file_map_close(&map);
+ return false;
+ }
+
+ p_clear(local, 1);
+ local->filename = m_strdup(file);
+ local->db = &res->trie1;
+ local->weight = weight;
+ local->reverse = reverse;
+ local->partial = partial;
+ if (res->size == map.st.st_size && res->mtime == map.st.st_mtime) {
+ info("strlist %s up to date", file);
+ file_map_close(&map);
+ return true;
+ }
+ trie_delete(&res->trie1);
+ res->trie1 = trie_new();
+ res->size = map.st.st_size;
+ res->mtime = map.st.st_mtime;
+