diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-03-12 14:33:09 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-03-12 14:33:09 +0000 |
commit | fe68df49f6cdd499f82c4edd320c9a9d20e2c0c0 (patch) | |
tree | eacd2d0314ccea9407750d03be959016fdedfbff /src | |
parent | c0188b218a9a33c5ad5af29054c610a358b52ff0 (diff) | |
download | rspamd-fe68df49f6cdd499f82c4edd320c9a9d20e2c0c0.tar.gz rspamd-fe68df49f6cdd499f82c4edd320c9a9d20e2c0c0.zip |
Adopt lua-redis for new inet_addr.
Diffstat (limited to 'src')
-rw-r--r-- | src/lua/lua_redis.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lua/lua_redis.c b/src/lua/lua_redis.c index d9d9702dd..1989b2044 100644 --- a/src/lua/lua_redis.c +++ b/src/lua/lua_redis.c @@ -49,7 +49,6 @@ struct lua_redis_userdata { struct rspamd_task *task; gint cbref; gchar *server; - struct in_addr ina; gchar *reqline; guint16 port; }; @@ -213,15 +212,15 @@ lua_redis_make_request (lua_State *L) addr = lua_check_ip (L, 2); top = lua_gettop (L); /* Now get callback */ - if (lua_isfunction (L, 3) && addr != NULL && addr->is_valid && top >= 4) { + if (lua_isfunction (L, 3) && addr != NULL && addr->addr && top >= 4) { /* Create userdata */ ud = rspamd_mempool_alloc (task->task_pool, sizeof (struct lua_redis_userdata)); ud->task = task; ud->L = L; - ud->ctx = redisAsyncConnect (rspamd_inet_address_to_string (&addr->addr), - rspamd_inet_address_get_port (&addr->addr)); + ud->ctx = redisAsyncConnect (rspamd_inet_address_to_string (addr->addr), + rspamd_inet_address_get_port (addr->addr)); if (ud->ctx == NULL || ud->ctx->err) { redisAsyncFree (ud->ctx); |