]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: h3: remove dead code
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 7 Oct 2021 14:27:36 +0000 (16:27 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 13 Oct 2021 14:38:56 +0000 (16:38 +0200)
Remove unused function. This will simplify code maintenance.

src/h3.c
src/mux_quic.c

index 1469dfb25fe30ab49fb362a82c4da669b7135ee5..fc68432f84ab378ab21b135f7f8a28896f525ac0 100644 (file)
--- a/src/h3.c
+++ b/src/h3.c
@@ -703,23 +703,6 @@ static struct task *h3_uqs_task(struct task *t, void *ctx, unsigned int state)
        return NULL;
 }
 
-#if 0
-/* Initialiaze <h3_uqs> uni-stream with <t> as tasklet */
-static int h3_uqs_init(struct h3_uqs *h3_uqs,
-                         struct task *(*t)(struct task *, void *, unsigned int))
-{
-       h3_uqs->qcs = NULL;
-       h3_uqs->cb = NULL;
-       h3_uqs->wait_event.tasklet = tasklet_new();
-       if (!h3_uqs->wait_event.tasklet)
-               return 0;
-
-       h3_uqs->wait_event.tasklet->process = t;
-       h3_uqs->wait_event.tasklet->context = h3_uqs;
-       return 1;
-}
-#endif
-
 /* Release all the tasklet attached to <h3_uqs> uni-stream */
 static inline void h3_uqs_tasklet_release(struct h3_uqs *h3_uqs)
 {
index 55a4dc5577703703285e62f4aaf2ff277e84b83b..d16fd9777819cbfbb7bfc6cbcd801dfe1ec96261 100644 (file)
@@ -1842,45 +1842,6 @@ static size_t qc_rcv_buf(struct conn_stream *cs, struct buffer *buf, size_t coun
        return ret;
 }
 
-/* Called from the upper layer, to send data from buffer <buf> for no more than
- * <count> bytes. Returns the number of bytes effectively sent. Some status
- * flags may be updated on the mux.
- */
-size_t luqs_snd_buf(struct qcs *qcs, struct buffer *buf, size_t count, int flags)
-{
-       size_t room, total = 0;
-       struct qcc *qcc = qcs->qcc;
-       struct buffer *res;
-
-       TRACE_ENTER(QC_EV_QCS_SEND|QC_EV_STRM_SEND, qcs->qcc->conn);
-       if (!count)
-               goto out;
-
-       res = &qcs->tx.buf;
-       if (!qc_get_buf(qcc, res)) {
-               qcc->flags |= QC_CF_MUX_MALLOC;
-               goto out;
-       }
-
-       room = b_room(res);
-       if (!room)
-               goto out;
-
-       if (count > room)
-               count = room;
-
-       total += b_xfer(res, buf, count);
-       qcs_push_frame(qcs, res, 0, 0);
-
- out:
-       TRACE_LEAVE(QC_EV_QCS_SEND|QC_EV_STRM_SEND, qcs->qcc->conn);
-       return total;
-
- err:
-       TRACE_DEVEL("leaving on stream error", QC_EV_QCS_SEND|QC_EV_STRM_SEND, qcs->qcc->conn);
-       return total;
-}
-
 /* for debugging with CLI's "show fd" command */
 static int qc_show_fd(struct buffer *msg, struct connection *conn)
 {