diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-10-24 11:37:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-24 11:37:10 +0100 |
commit | dae599e3677e38c5731e6a01692b082942c15ba8 (patch) | |
tree | 5d7cb1ad1f3f7a7b55b878439442f4c164674207 /src/lua | |
parent | 46412377240b637dc94da122d526c2b8e8138852 (diff) | |
parent | 2de5d8e435f17edc7d8830d8f2643c6d11065585 (diff) | |
download | rspamd-dae599e3677e38c5731e6a01692b082942c15ba8.tar.gz rspamd-dae599e3677e38c5731e6a01692b082942c15ba8.zip |
Merge pull request #1064 from fatalbanana/tcp
[Minor] Fix task-less lua tcp
Diffstat (limited to 'src/lua')
-rw-r--r-- | src/lua/lua_tcp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lua/lua_tcp.c b/src/lua/lua_tcp.c index 854407226..910379850 100644 --- a/src/lua/lua_tcp.c +++ b/src/lua/lua_tcp.c @@ -573,7 +573,7 @@ lua_tcp_request (lua_State *L) if (task == NULL) { lua_pushstring (L, "ev_base"); lua_gettable (L, -2); - if (rspamd_lua_check_udata (L, -1, "rspamd{ev_base}")) { + if (rspamd_lua_check_udata_maybe (L, -1, "rspamd{ev_base}")) { ev_base = *(struct event_base **)lua_touserdata (L, -1); } else { @@ -593,7 +593,7 @@ lua_tcp_request (lua_State *L) lua_pushstring (L, "resolver"); lua_gettable (L, -2); - if (rspamd_lua_check_udata (L, -1, "rspamd{resolver}")) { + if (rspamd_lua_check_udata_maybe (L, -1, "rspamd{resolver}")) { resolver = *(struct rspamd_dns_resolver **)lua_touserdata (L, -1); } else { @@ -603,7 +603,7 @@ lua_tcp_request (lua_State *L) lua_pushstring (L, "session"); lua_gettable (L, -2); - if (rspamd_lua_check_udata (L, -1, "rspamd{session}")) { + if (rspamd_lua_check_udata_maybe (L, -1, "rspamd{session}")) { session = *(struct rspamd_async_session **)lua_touserdata (L, -1); } else { |