]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: quic: rename local tid variable
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 8 Feb 2022 14:05:58 +0000 (15:05 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 9 Feb 2022 14:05:23 +0000 (15:05 +0100)
Rename a local variable tid to cid_tid. This ensures there is no
confusion with the global tid. It is now more explicit that we are
manipulating a quic datagram handlers from another thread in
quic_lstnr_dgram_dispatch.

src/xprt_quic.c

index 23126e7beb1d3459e9152a38b352656c3a9fb332..eee9bae516f00cbd04e07afd0b384d940ef3069b 100644 (file)
@@ -5457,7 +5457,7 @@ int quic_lstnr_dgram_dispatch(unsigned char *buf, size_t len, void *owner,
        struct quic_dgram *dgram;
        unsigned char *dcid;
        size_t dcid_len;
-       int tid;
+       int cid_tid;
        struct listener *l = owner;
 
        if (!len || !quic_get_dgram_dcid(buf, buf + len, &dcid, &dcid_len))
@@ -5467,7 +5467,8 @@ int quic_lstnr_dgram_dispatch(unsigned char *buf, size_t len, void *owner,
        if (!dgram)
                goto err;
 
-       tid = quic_get_cid_tid(dcid);
+       cid_tid = quic_get_cid_tid(dcid);
+
        /* All the members must be initialized! */
        dgram->owner = owner;
        dgram->buf = buf;
@@ -5477,9 +5478,9 @@ int quic_lstnr_dgram_dispatch(unsigned char *buf, size_t len, void *owner,
        dgram->saddr = *saddr;
        dgram->qc = NULL;
        LIST_APPEND(dgrams, &dgram->list);
-       MT_LIST_APPEND(&l->rx.dghdlrs[tid]->dgrams, &dgram->mt_list);
+       MT_LIST_APPEND(&l->rx.dghdlrs[cid_tid]->dgrams, &dgram->mt_list);
 
-       tasklet_wakeup(l->rx.dghdlrs[tid]->task);
+       tasklet_wakeup(l->rx.dghdlrs[cid_tid]->task);
 
        return 1;