From 17f79d251994ad4abea313739a5322f7b1352d91 Mon Sep 17 00:00:00 2001 From: dartraiden Date: Thu, 16 Feb 2023 01:09:08 +0300 Subject: libcurl: update to 7.88.0 --- libs/libcurl/src/imap.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'libs/libcurl/src/imap.c') diff --git a/libs/libcurl/src/imap.c b/libs/libcurl/src/imap.c index 11980286c2..53d6a2b0aa 100644 --- a/libs/libcurl/src/imap.c +++ b/libs/libcurl/src/imap.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2022, Daniel Stenberg, , et al. + * Copyright (C) Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -475,15 +475,17 @@ static CURLcode imap_perform_upgrade_tls(struct Curl_easy *data, /* Start the SSL connection */ struct imap_conn *imapc = &conn->proto.imapc; CURLcode result; + bool ssldone = FALSE; - if(!Curl_conn_is_ssl(data, FIRSTSOCKET)) { + if(!Curl_conn_is_ssl(conn, FIRSTSOCKET)) { result = Curl_ssl_cfilter_add(data, conn, FIRSTSOCKET); if(result) goto out; } - result = Curl_conn_connect(data, FIRSTSOCKET, FALSE, &imapc->ssldone); + result = Curl_conn_connect(data, FIRSTSOCKET, FALSE, &ssldone); if(!result) { + imapc->ssldone = ssldone; if(imapc->state != IMAP_UPGRADETLS) state(data, IMAP_UPGRADETLS); @@ -952,7 +954,7 @@ static CURLcode imap_state_capability_resp(struct Curl_easy *data, line += wordlen; } } - else if(data->set.use_ssl && !Curl_conn_is_ssl(data, FIRSTSOCKET)) { + else if(data->set.use_ssl && !Curl_conn_is_ssl(conn, FIRSTSOCKET)) { /* PREAUTH is not compatible with STARTTLS. */ if(imapcode == IMAP_RESP_OK && imapc->tls_supported && !imapc->preauth) { /* Switch to TLS connection now */ @@ -1386,8 +1388,10 @@ static CURLcode imap_multi_statemach(struct Curl_easy *data, bool *done) struct imap_conn *imapc = &conn->proto.imapc; if((conn->handler->flags & PROTOPT_SSL) && !imapc->ssldone) { - result = Curl_conn_connect(data, FIRSTSOCKET, FALSE, &imapc->ssldone); - if(result || !imapc->ssldone) + bool ssldone = FALSE; + result = Curl_conn_connect(data, FIRSTSOCKET, FALSE, &ssldone); + imapc->ssldone = ssldone; + if(result || !ssldone) return result; } @@ -1774,7 +1778,7 @@ static CURLcode imap_sendf(struct Curl_easy *data, const char *fmt, ...) /* Calculate the tag based on the connection ID and command ID */ msnprintf(imapc->resptag, sizeof(imapc->resptag), "%c%03d", 'A' + curlx_sltosi(data->conn->connection_id % 26), - (++imapc->cmdid)%1000); + ++imapc->cmdid); /* start with a blank buffer */ Curl_dyn_reset(&imapc->dyn); -- cgit v1.2.3