]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Fix lua tcp module by saving `do_read` in callback data
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 8 Nov 2016 13:21:07 +0000 (16:21 +0300)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 8 Nov 2016 13:21:07 +0000 (16:21 +0300)
src/lua/lua_tcp.c

index 63c9f8a074c90b33ce9f14237281fab823ff7923..7be257b51e3ed93e8530a610328a40aaff1a0096 100644 (file)
@@ -758,6 +758,7 @@ lua_tcp_request (lua_State *L)
        cbd->stop_pattern = stop_pattern;
        cbd->connect_cb = conn_cbref;
        cbd->in = g_byte_array_new ();
+       cbd->do_read = do_read;
        rspamd_mempool_add_destructor (cbd->pool,
                        (rspamd_mempool_destruct_t)g_byte_array_unref,
                        cbd->in);