From c494636eedee963c4789fc7b8a0cd7d9acc80e18 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Sat, 5 Mar 2011 17:15:06 +0300 Subject: Ignore group addresses. --- src/lua/lua_task.c | 12 +++++++----- 1 file 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 -- cgit v1.2.3