]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: ssl: Remove unused variable "need_out".
authorOlivier Houchard <cognet@ci0.org>
Sun, 5 Jan 2020 15:45:14 +0000 (16:45 +0100)
committerOlivier Houchard <cognet@ci0.org>
Sun, 5 Jan 2020 15:45:14 +0000 (16:45 +0100)
The "need_out" variable was used to let the ssl code know we're done
reading early data, and we should start the handshake.
Now that the handshake function is responsible for taking care of reading
early data, all that logic has been removed from ssl_sock_to_buf(), but
need_out was forgotten, and left. Remove it know.
This patch was submitted by William Dauchy <w.dauchy@criteo.com>, and should
fix github issue #434.
This should be backported to 2.0 and 2.1.

src/ssl_sock.c

index e4dd913a4c01a524937c1ad84e4b9ab20604e0dd..124b2c602aacf7d21ff9999d0be23b1c3e87418c 100644 (file)
@@ -6537,7 +6537,6 @@ static size_t ssl_sock_to_buf(struct connection *conn, void *xprt_ctx, struct bu
         * EINTR too.
         */
        while (count > 0) {
-               int need_out = 0;
 
                try = b_contig_space(buf);
                if (!try)
@@ -6595,8 +6594,6 @@ static size_t ssl_sock_to_buf(struct connection *conn, void *xprt_ctx, struct bu
                        /* otherwise it's a real error */
                        goto out_error;
                }
-               if (need_out)
-                       break;
        }
  leave:
        return done;