if (lua_pcall (cbd->L, 2, 0, 0) != 0) {
msg_info ("callback call failed: %s", lua_tostring (cbd->L, -1));
}
-
- if (!cbd->partial) {
- lua_tcp_maybe_free (cbd);
- }
}
static void
&reply->entries->content.aaa.addr);
}
+ rspamd_inet_address_set_port (cbd->addr, cbd->port);
+
if (!lua_tcp_make_connection (cbd)) {
lua_tcp_push_error (cbd, "unable to make connection to the host");
lua_tcp_maybe_free (cbd);
gboolean partial = FALSE;
if (lua_type (L, 1) == LUA_TTABLE) {
- lua_pushstring (L, "url");
+ lua_pushstring (L, "host");
lua_gettable (L, -2);
host = luaL_checkstring (L, -1);
lua_pop (L, 1);
cbd->iovlen = niov;
cbd->total = total_out;
cbd->pos = 0;
+ cbd->port = port;
if (session) {
cbd->session = session;