aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2011-02-17 17:33:15 +0300
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2011-02-17 17:33:15 +0300
commit535231642d8fbe5f65052507e4527ea1d28d4657 (patch)
treea728360b915ac4c588db340e6d77566f32734c1e /src
parent32dbe5634cc672278f740039becdc330e928e96b (diff)
downloadrspamd-535231642d8fbe5f65052507e4527ea1d28d4657.tar.gz
rspamd-535231642d8fbe5f65052507e4527ea1d28d4657.zip
Fix received headers passing to lua.
Diffstat (limited to 'src')
-rw-r--r--src/lua/lua_task.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lua/lua_task.c b/src/lua/lua_task.c
index 892bbdf07..8b02ac5e7 100644
--- a/src/lua/lua_task.c
+++ b/src/lua/lua_task.c
@@ -324,6 +324,13 @@ lua_task_get_received_headers (lua_State * L)
cur = g_list_first (task->received);
while (cur) {
rh = cur->data;
+ if (rh->is_error || (
+ rh->from_ip == NULL &&
+ rh->real_ip == NULL &&
+ rh->real_hostname == NULL)) {
+ cur = g_list_next (cur);
+ continue;
+ }
lua_newtable (L);
lua_set_table_index (L, "from_hostname", rh->from_hostname);
lua_set_table_index (L, "from_ip", rh->from_ip);