diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2014-04-20 08:16:49 -0700 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2014-04-20 08:16:49 -0700 |
commit | ad837700b86153be3587672124ee663c964f0f15 (patch) | |
tree | 7ec6e8fbe539a169d501a3d1767644b68fab2dab /src/binlog.c | |
parent | baeb17562f47dc31610c0f65079c45a7e6ad44bb (diff) | |
download | rspamd-ad837700b86153be3587672124ee663c964f0f15.tar.gz rspamd-ad837700b86153be3587672124ee663c964f0f15.zip |
Refactor memory pool naming.
Diffstat (limited to 'src/binlog.c')
-rw-r--r-- | src/binlog.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/binlog.c b/src/binlog.c index c6aa4ec08..f085a7de0 100644 --- a/src/binlog.c +++ b/src/binlog.c @@ -33,7 +33,7 @@ #define VALID_VERSION { '1', '0' } static GHashTable *binlog_opened = NULL; -static memory_pool_t *binlog_pool = NULL; +static rspamd_mempool_t *binlog_pool = NULL; static gboolean binlog_write_header (struct rspamd_binlog *log) @@ -151,13 +151,13 @@ binlog_open_real (struct rspamd_binlog *log) struct rspamd_binlog* -binlog_open (memory_pool_t *pool, const gchar *path, time_t rotate_time, gint rotate_jitter) +binlog_open (rspamd_mempool_t *pool, const gchar *path, time_t rotate_time, gint rotate_jitter) { struct rspamd_binlog *new; gint len = strlen (path); struct stat st; - new = memory_pool_alloc0 (pool, sizeof (struct rspamd_binlog)); + new = rspamd_mempool_alloc0 (pool, sizeof (struct rspamd_binlog)); new->pool = pool; new->rotate_time = rotate_time; new->fd = -1; @@ -166,7 +166,7 @@ binlog_open (memory_pool_t *pool, const gchar *path, time_t rotate_time, gint ro new->rotate_jitter = g_random_int_range (0, rotate_jitter); } - new->filename = memory_pool_alloc (pool, len + sizeof (BINLOG_SUFFIX)); + new->filename = rspamd_mempool_alloc (pool, len + sizeof (BINLOG_SUFFIX)); rspamd_strlcpy (new->filename, path, len + 1); rspamd_strlcpy (new->filename + len, BINLOG_SUFFIX, sizeof (BINLOG_SUFFIX)); @@ -508,7 +508,7 @@ maybe_init_static (void) } if (!binlog_pool) { - binlog_pool = memory_pool_new (memory_pool_get_size ()); + binlog_pool = rspamd_mempool_new (rspamd_mempool_suggest_size ()); if (!binlog_pool) { return FALSE; } |