summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2011-03-05 17:15:06 +0300
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2011-03-05 17:15:06 +0300
commitc494636eedee963c4789fc7b8a0cd7d9acc80e18 (patch)
tree2cad1aee07035992a300f75c1311c99209bda257
parent91b8f827e311b36959e26db5f2ca242e5cedd4d7 (diff)
downloadrspamd-c494636eedee963c4789fc7b8a0cd7d9acc80e18.tar.gz
rspamd-c494636eedee963c4789fc7b8a0cd7d9acc80e18.zip
Ignore group addresses.
-rw-r--r--src/lua/lua_task.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/lua/lua_task.c b/src/lua/lua_task.c
index 3d1e240cb..549bdc914 100644
--- a/src/lua/lua_task.c
+++ b/src/lua/lua_task.c
@@ -716,11 +716,13 @@ lua_push_internet_address (lua_State *L, InternetAddressList *addrs)
lua_newtable (L);
cur = addrs;
while (cur) {
- ia = internet_address_list_get_address (cur);
- lua_newtable (L);
- lua_set_table_index (L, "name", internet_address_get_name (ia));
- lua_set_table_index (L, "addr", internet_address_get_addr (ia));
- lua_rawseti (L, -2, idx++);
+ ia = internet_address_list_get_address (cur);
+ if (internet_address_get_type (ia) == INTERNET_ADDRESS_NAME) {
+ lua_newtable (L);
+ lua_set_table_index (L, "name", internet_address_get_name (ia));
+ lua_set_table_index (L, "addr", internet_address_get_addr (ia));
+ lua_rawseti (L, -2, idx++);
+ }
cur = internet_address_list_next (cur);
}
#else