@@ -117,7 +117,8 @@ rspamd_config_new (void) | |||
struct rspamd_config *cfg; | |||
cfg = g_malloc0 (sizeof (*cfg)); | |||
cfg->cfg_pool = rspamd_mempool_new (rspamd_mempool_suggest_size (), "cfg"); | |||
/* Allocate larger pool for cfg */ | |||
cfg->cfg_pool = rspamd_mempool_new (8 * 1024 * 1024, "cfg"); | |||
cfg->dns_timeout = 1000; | |||
cfg->dns_retransmits = 5; | |||
/* After 20 errors do throttling for 10 seconds */ |
@@ -354,7 +354,13 @@ rspamd_mempool_new_ (gsize size, const gchar *tag, const gchar *loc) | |||
sizeof (struct _pool_destructors), 32); | |||
rspamd_mempool_create_pool_type (new, RSPAMD_MEMPOOL_NORMAL); | |||
/* Set it upon first call of set variable */ | |||
new->elt_len = new->entry->cur_suggestion; | |||
if (size == 0) { | |||
new->elt_len = new->entry->cur_suggestion; | |||
} | |||
else { | |||
new->elt_len = size; | |||
} | |||
if (tag) { | |||
rspamd_strlcpy (new->tag.tagname, tag, sizeof (new->tag.tagname)); |