]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: h2: minimum documentation for recent API changes
authorWilly Tarreau <w@1wt.eu>
Sun, 18 Nov 2018 05:30:59 +0000 (06:30 +0100)
committerWilly Tarreau <w@1wt.eu>
Sun, 18 Nov 2018 05:35:29 +0000 (06:35 +0100)
Commit d4dd22d ("MINOR: h2: Let user of h2_recv() and h2_send() know xfer
has been done") changed the API without documenting the expected returned
values which appear to come out of nowhere in the code :-(  Please don't
do that anymore! The description was recovered from the commit message.

src/mux_h2.c

index a5ea6c3ad9558d8d9aa5fd3705abcdd48613fed4..de635127e98b113dd1beecc2e606079426fb10a4 100644 (file)
@@ -2222,7 +2222,9 @@ static int h2_process_mux(struct h2c *h2c)
 }
 
 
-/* Attempt to read data, and subscribe if none available */
+/* Attempt to read data, and subscribe if none available.
+ * The function returns 1 if data has been received, otherwise zero.
+ */
 static int h2_recv(struct h2c *h2c)
 {
        struct connection *conn = h2c->conn;
@@ -2263,7 +2265,9 @@ static int h2_recv(struct h2c *h2c)
        return 1;
 }
 
-/* Try to send data if possible */
+/* Try to send data if possible.
+ * The function returns 1 if data have been sent, otherwise zero.
+ */
 static int h2_send(struct h2c *h2c)
 {
        struct connection *conn = h2c->conn;