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