event_del (¶m->ev);
close (param->sock);
- param->task->save.saved--;
- make_surbl_requests (param->url, param->task, param->suffix, FALSE);
- if (param->task->save.saved == 0) {
- /* Call other filters */
- param->task->save.saved = 1;
- process_filters (param->task);
- }
-
}
static void
msg_err ("write failed %s to %s", strerror (errno), param->redirector->name);
upstream_fail (¶m->redirector->up, param->task->tv.tv_sec);
remove_normal_event (param->task->s, free_redirector_session, param);
-
+ param->task->save.saved--;
+ make_surbl_requests (param->url, param->task, param->suffix, FALSE);
+ if (param->task->save.saved == 0) {
+ /* Call other filters */
+ param->task->save.saved = 1;
+ process_filters (param->task);
+ }
return;
}
param->state = STATE_READ;
param->task->message_id, param->redirector->name);
upstream_fail (¶m->redirector->up, param->task->tv.tv_sec);
remove_normal_event (param->task->s, free_redirector_session, param);
-
+ param->task->save.saved--;
+ make_surbl_requests (param->url, param->task, param->suffix, FALSE);
+ if (param->task->save.saved == 0) {
+ /* Call other filters */
+ param->task->save.saved = 1;
+ process_filters (param->task);
+ }
return;
}
break;
msg_err ("read failed: %s from %s", strerror (errno), param->redirector->name);
upstream_fail (¶m->redirector->up, param->task->tv.tv_sec);
remove_normal_event (param->task->s, free_redirector_session, param);
-
+ param->task->save.saved--;
+ make_surbl_requests (param->url, param->task, param->suffix, FALSE);
+ if (param->task->save.saved == 0) {
+ /* Call other filters */
+ param->task->save.saved = 1;
+ process_filters (param->task);
+ }
return;
}
parse_uri (param->url, memory_pool_strdup (param->task->task_pool, c), param->task->task_pool);
}
}
+ param->task->save.saved--;
+ make_surbl_requests (param->url, param->task, param->suffix, FALSE);
+ if (param->task->save.saved == 0) {
+ /* Call other filters */
+ param->task->save.saved = 1;
+ process_filters (param->task);
+ }
upstream_ok (¶m->redirector->up, param->task->tv.tv_sec);
remove_normal_event (param->task->s, free_redirector_session, param);
}
msg_info ("<%s> reading redirector %s timed out, while waiting for read",
param->redirector->name, param->task->message_id);
upstream_fail (¶m->redirector->up, param->task->tv.tv_sec);
+ param->task->save.saved--;
+ make_surbl_requests (param->url, param->task, param->suffix, FALSE);
+ if (param->task->save.saved == 0) {
+ /* Call other filters */
+ param->task->save.saved = 1;
+ process_filters (param->task);
+ }
remove_normal_event (param->task->s, free_redirector_session, param);
}
break;
surbl_tree_url_callback (gpointer key, gpointer value, void *data)
{
struct redirector_param *param = data;
- struct worker_task *task = param->task;
+ struct worker_task *task;
struct uri *url = value;
f_str_t f;
gchar *red_domain;
GRegex *re;
guint idx, len;
+ task = param->task;
debug_task ("check url %s", struri (url));
if (url->hostlen <= 0) {