static void
-fuzzy_lua_fin(void *ud)
+fuzzy_controller_lua_fin(void *ud)
{
struct fuzzy_learn_session *session = ud;
session->rule->retransmits);
if (session->session) {
- rspamd_session_remove_event(session->session, fuzzy_lua_fin,
+ rspamd_session_remove_event(session->session, fuzzy_controller_lua_fin,
session);
}
else {
}
else {
/* Lua handler */
- rspamd_session_remove_event(session->session, fuzzy_lua_fin, session);
+ rspamd_session_remove_event(session->session, fuzzy_controller_lua_fin, session);
}
return;
rule->io_timeout);
rspamd_session_add_event(task->s,
- fuzzy_lua_fin,
+ fuzzy_controller_lua_fin,
s,
M);
if (nreplied == session->commands->len) {
- rspamd_session_remove_event(session->task->s, fuzzy_io_fin, session);
+ rspamd_session_remove_event(session->task->s, fuzzy_lua_session_fin, session);
return TRUE;
}
static gint
fuzzy_lua_try_read(struct fuzzy_lua_session *session)
{
- struct rspamd_task *task;
const struct rspamd_fuzzy_reply *rep;
struct rspamd_fuzzy_cmd *cmd = NULL;
struct fuzzy_cmd_io *io = NULL;
gint r, ret;
guchar buf[2048], *p;
- task = session->task;
-
if ((r = read(session->fd, buf, sizeof(buf) - 1)) == -1) {
if (errno == EAGAIN || errno == EWOULDBLOCK || errno == EINTR) {
return 0;
&session->ev, EV_READ);
}
else if (ret == return_error) {
- rspamd_session_remove_event(session->task->s, fuzzy_io_fin, session);
+ rspamd_session_remove_event(session->task->s, fuzzy_lua_session_fin, session);
}
else {
/* Read something from network */