Move the bit `connection_only` from `connectdata` to `ConnectBits`.
Since we keep all other bits there, seems the correct place.
Closes #20959
/* treat the connection as aborted in CONNECT_ONLY situations, we do
* not know what the APP did with it. */
- if(conn->connect_only)
+ if(conn->bits.connect_only)
aborted = TRUE;
conn->bits.aborted = aborted;
for(curr = Curl_llist_head(&bundle->conns); curr;
curr = Curl_node_next(curr)) {
conn = Curl_node_elem(curr);
- if(CONN_INUSE(conn) || conn->bits.close || conn->connect_only)
+ if(CONN_INUSE(conn) || conn->bits.close || conn->bits.connect_only)
continue;
/* Set higher score for the age passed since the connection was used */
score = curlx_ptimediff_ms(pnow, &conn->lastused);
/* treat the connection as aborted in CONNECT_ONLY situations,
* so no graceful shutdown is attempted. */
- if(conn->connect_only)
+ if(conn->bits.connect_only)
aborted = TRUE;
if(data->multi) {
return;
}
- if(!conn->connect_only && Curl_conn_is_connected(conn, FIRSTSOCKET))
+ if(!conn->bits.connect_only && Curl_conn_is_connected(conn, FIRSTSOCKET))
r1 = Curl_conn_shutdown(data, FIRSTSOCKET, &done1);
else {
r1 = CURLE_OK;
done1 = TRUE;
}
- if(!conn->connect_only && Curl_conn_is_connected(conn, SECONDARYSOCKET))
+ if(!conn->bits.connect_only && Curl_conn_is_connected(conn, SECONDARYSOCKET))
r2 = Curl_conn_shutdown(data, SECONDARYSOCKET, &done2);
else {
r2 = CURLE_OK;
/* Defer flushing during the connect phase so that the SETTINGS and
* other initial frames are sent together with the first request.
* Unless we are 'connect_only' where the request will never come. */
- if(!cf->connected && !cf->conn->connect_only)
+ if(!cf->connected && !cf->conn->bits.connect_only)
return CURLE_OK;
return nw_out_flush(cf, data);
}
{
(void)userdata;
(void)data;
- if(conn->connect_only)
+ if(conn->bits.connect_only)
connclose(conn, "Removing connect-only easy handle");
}
struct url_conn_match *m)
{
/* connect-only or to-be-closed connections will not be reused */
- if(conn->connect_only || conn->bits.close || conn->bits.no_reuse)
+ if(conn->bits.connect_only || conn->bits.close || conn->bits.no_reuse)
return FALSE;
/* ip_version must match */
conn->bits.ftp_use_eprt = data->set.ftp_use_eprt;
#endif
conn->ip_version = data->set.ipver;
- conn->connect_only = (bool)data->set.connect_only;
+ conn->bits.connect_only = (bool)data->set.connect_only;
conn->transport_wanted = TRNSPRT_TCP; /* most of them are TCP streams */
/* Store the local bind parameters that will be used for this connection */
* Boolean values that concerns this connection.
*/
struct ConnectBits {
+ BIT(connect_only);
#ifndef CURL_DISABLE_PROXY
BIT(httpproxy); /* if set, this transfer is done through an HTTP proxy */
BIT(socksproxy); /* if set, this transfer is done through a socks proxy */
* 0 at start, then one of 09, 10, 11, etc. */
uint8_t httpversion_seen;
uint8_t gssapi_delegation; /* inherited from set.gssapi_delegation */
- BIT(connect_only);
};
#ifndef CURL_DISABLE_PROXY
else {
infof(data, "SSL reusing session with ALPN '%s'",
scs->alpn ? scs->alpn : "-");
- if(ssl_config->earlydata && scs->alpn && !cf->conn->connect_only) {
+ if(ssl_config->earlydata && scs->alpn &&
+ !cf->conn->bits.connect_only) {
bool do_early_data = FALSE;
if(sess_reuse_cb) {
result = sess_reuse_cb(cf, data, &alpns, scs, &do_early_data);
#ifdef HAVE_OPENSSL_EARLYDATA
if(ssl_config->earlydata && scs->alpn &&
SSL_SESSION_get_max_early_data(ssl_session) &&
- !cf->conn->connect_only &&
+ !cf->conn->bits.connect_only &&
(SSL_version(octx->ssl) == TLS1_3_VERSION)) {
bool do_early_data = FALSE;
if(sess_reuse_cb) {
infof(data, "SSL reusing session with ALPN '%s'",
scs->alpn ? scs->alpn : "-");
if(ssl_config->earlydata &&
- !cf->conn->connect_only &&
+ !cf->conn->bits.connect_only &&
!strcmp("TLSv1.3", wolfSSL_get_version(wss->ssl))) {
bool do_early_data = FALSE;
if(sess_reuse_cb) {