This replaces the previous conn_get_{from,to}_addr() and reuses the
existing error checks.
return 1;
}
- conn_get_to_addr(conn);
- if (!(conn->flags & CO_FL_ADDR_TO_SET)) {
+ if (!conn_get_dst(conn)) {
xref_unlock(&socket->xref, peer);
lua_pushnil(L);
return 1;
return 1;
}
- conn_get_from_addr(conn);
- if (!(conn->flags & CO_FL_ADDR_FROM_SET)) {
+ if (!conn_get_src(conn)) {
xref_unlock(&socket->xref, peer);
lua_pushnil(L);
return 1;