aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua/lua_redis.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2014-04-20 08:16:49 -0700
committerVsevolod Stakhov <vsevolod@highsecure.ru>2014-04-20 08:16:49 -0700
commitad837700b86153be3587672124ee663c964f0f15 (patch)
tree7ec6e8fbe539a169d501a3d1767644b68fab2dab /src/lua/lua_redis.c
parentbaeb17562f47dc31610c0f65079c45a7e6ad44bb (diff)
downloadrspamd-ad837700b86153be3587672124ee663c964f0f15.tar.gz
rspamd-ad837700b86153be3587672124ee663c964f0f15.zip
Refactor memory pool naming.
Diffstat (limited to 'src/lua/lua_redis.c')
-rw-r--r--src/lua/lua_redis.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lua/lua_redis.c b/src/lua/lua_redis.c
index 2f9020659..33caefad3 100644
--- a/src/lua/lua_redis.c
+++ b/src/lua/lua_redis.c
@@ -282,8 +282,8 @@ lua_redis_make_request (lua_State *L)
/* Now get callback */
if (lua_isfunction (L, 4) && server != NULL && port > 0 && port < G_MAXUINT16) {
/* Create userdata */
- ud = memory_pool_alloc (task->task_pool, sizeof (struct lua_redis_userdata));
- ud->server = memory_pool_strdup (task->task_pool, server);
+ ud = rspamd_mempool_alloc (task->task_pool, sizeof (struct lua_redis_userdata));
+ ud->server = rspamd_mempool_strdup (task->task_pool, server);
ud->port = port;
ud->task = task;
ud->L = L;
@@ -292,14 +292,14 @@ lua_redis_make_request (lua_State *L)
lua_pushvalue (L, 4);
/* Get a reference */
ud->cbref = luaL_ref (L, LUA_REGISTRYINDEX);
- ud->reqline = memory_pool_strdup (task->task_pool, luaL_checkstring (L, 5));
+ ud->reqline = rspamd_mempool_strdup (task->task_pool, luaL_checkstring (L, 5));
/* Now get remaining args */
ud->args_num = lua_gettop (L) - 5;
- ud->args = memory_pool_alloc (task->task_pool, ud->args_num * sizeof (f_str_t));
+ ud->args = rspamd_mempool_alloc (task->task_pool, ud->args_num * sizeof (f_str_t));
for (i = 0; i < ud->args_num; i ++) {
tmp = lua_tolstring (L, i + 6, &ud->args[i].len);
/* Make a copy of argument */
- ud->args[i].begin = memory_pool_alloc (task->task_pool, ud->args[i].len);
+ ud->args[i].begin = rspamd_mempool_alloc (task->task_pool, ud->args[i].len);
memcpy (ud->args[i].begin, tmp, ud->args[i].len);
}
/* Now check whether we need to perform DNS request */