MINOR: stream-int: use conn_get_{src,dst} in conn_si_send_proxy()

These ones replace the previous conn_get_{from,to}_addr() used to wait
for the connection establishment before sending a LOCAL line. The
error handling was preserved.
This commit is contained in:
Willy Tarreau 2019-07-17 11:40:51 +02:00
parent dddd2b422f
commit 7bb447c3dd

View File

@ -381,12 +381,7 @@ int conn_si_send_proxy(struct connection *conn, unsigned int flag)
/* The target server expects a LOCAL line to be sent first. Retrieving /* The target server expects a LOCAL line to be sent first. Retrieving
* local or remote addresses may fail until the connection is established. * local or remote addresses may fail until the connection is established.
*/ */
conn_get_from_addr(conn); if (!conn_get_src(conn) || !conn_get_dst(conn))
if (!(conn->flags & CO_FL_ADDR_FROM_SET))
goto out_wait;
conn_get_to_addr(conn);
if (!(conn->flags & CO_FL_ADDR_TO_SET))
goto out_wait; goto out_wait;
ret = make_proxy_line(trash.area, trash.size, ret = make_proxy_line(trash.area, trash.size,