mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-03-08 04:18:58 +00:00
CLEANUP: connection: Use istptr / istlen for proxy_unique_id
Don't access the ist's fields directly, use the helper functions instead.
This commit is contained in:
parent
e004c2beae
commit
002bd77a6e
@ -556,7 +556,7 @@ static inline void conn_free(struct connection *conn)
|
||||
pool_free(pool_head_authority, conn->proxy_authority);
|
||||
conn->proxy_authority = NULL;
|
||||
|
||||
pool_free(pool_head_uniqueid, conn->proxy_unique_id.ptr);
|
||||
pool_free(pool_head_uniqueid, istptr(conn->proxy_unique_id));
|
||||
conn->proxy_unique_id = IST_NULL;
|
||||
|
||||
pool_free(pool_head_conn_hash_node, conn->hash_node);
|
||||
|
@ -499,7 +499,7 @@ int conn_recv_proxy(struct connection *conn, int flag)
|
||||
case PP2_TYPE_UNIQUE_ID: {
|
||||
const struct ist tlv = ist2((const char *)tlv_packet->value, tlv_len);
|
||||
|
||||
if (tlv.len > UNIQUEID_LEN)
|
||||
if (istlen(tlv) > UNIQUEID_LEN)
|
||||
goto bad_header;
|
||||
conn->proxy_unique_id = ist2(pool_alloc(pool_head_uniqueid), 0);
|
||||
if (!isttest(conn->proxy_unique_id))
|
||||
@ -1384,8 +1384,8 @@ int smp_fetch_fc_pp_unique_id(const struct arg *args, struct sample *smp, const
|
||||
|
||||
smp->flags = 0;
|
||||
smp->data.type = SMP_T_STR;
|
||||
smp->data.u.str.area = conn->proxy_unique_id.ptr;
|
||||
smp->data.u.str.data = conn->proxy_unique_id.len;
|
||||
smp->data.u.str.area = istptr(conn->proxy_unique_id);
|
||||
smp->data.u.str.data = istlen(conn->proxy_unique_id);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user