From a735bf5c2a8a3d3d18c3a7e9cc728768c2086e89 Mon Sep 17 00:00:00 2001 From: Oran Agra Date: Wed, 23 Sep 2020 11:30:24 +0300 Subject: [PATCH] fix recently broken TLS build error, and add coverage for CI (#7833) --- .github/workflows/ci.yml | 3 ++- src/tls.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d28d331db..68593717f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,8 @@ jobs: steps: - uses: actions/checkout@v2 - name: make - run: make + # build with TLS just for compilatoin coverage + run: make BUILD_TLS=yes - name: test run: | sudo apt-get install tcl8.5 diff --git a/src/tls.c b/src/tls.c index f55d25c78..d3173fab0 100644 --- a/src/tls.c +++ b/src/tls.c @@ -454,7 +454,7 @@ void updateSSLEvent(tls_connection *conn) { } static void tlsHandleEvent(tls_connection *conn, int mask) { - int ret; + int ret, conn_error; TLSCONN_DEBUG("tlsEventHandler(): fd=%d, state=%d, mask=%d, r=%d, w=%d, flags=%d", fd, conn->c.state, mask, conn->c.read_handler != NULL, conn->c.write_handler != NULL, @@ -464,7 +464,7 @@ static void tlsHandleEvent(tls_connection *conn, int mask) { switch (conn->c.state) { case CONN_STATE_CONNECTING: - int conn_error = connGetSocketError((connection *) conn); + conn_error = connGetSocketError((connection *) conn); if (conn_error) { conn->c.last_errno = conn_error; conn->c.state = CONN_STATE_ERROR;