conn: fix typo 'connnection' -> 'connection' in two function names
Closes #8759
This commit is contained in:
parent
1669b17d3a
commit
e07a9b668a
@ -1139,7 +1139,7 @@ CURLcode curl_easy_recv(struct Curl_easy *data, void *buffer, size_t buflen,
|
||||
if(!data->conn)
|
||||
/* on first invoke, the transfer has been detached from the connection and
|
||||
needs to be reattached */
|
||||
Curl_attach_connnection(data, c);
|
||||
Curl_attach_connection(data, c);
|
||||
|
||||
*n = 0;
|
||||
result = Curl_read(data, sfd, buffer, buflen, &n1);
|
||||
@ -1175,7 +1175,7 @@ CURLcode curl_easy_send(struct Curl_easy *data, const void *buffer,
|
||||
if(!data->conn)
|
||||
/* on first invoke, the transfer has been detached from the connection and
|
||||
needs to be reattached */
|
||||
Curl_attach_connnection(data, c);
|
||||
Curl_attach_connection(data, c);
|
||||
|
||||
*n = 0;
|
||||
sigpipe_ignore(data, &pipe_st);
|
||||
@ -1209,12 +1209,12 @@ static int conn_upkeep(struct Curl_easy *data,
|
||||
if(conn->handler->connection_check) {
|
||||
/* briefly attach the connection to this transfer for the purpose of
|
||||
checking it */
|
||||
Curl_attach_connnection(data, conn);
|
||||
Curl_attach_connection(data, conn);
|
||||
|
||||
/* Do a protocol-specific keepalive check on the connection. */
|
||||
conn->handler->connection_check(data, conn, CONNCHECK_KEEPALIVE);
|
||||
/* detach the connection again */
|
||||
Curl_detach_connnection(data);
|
||||
Curl_detach_connection(data);
|
||||
}
|
||||
|
||||
return 0; /* continue iteration */
|
||||
|
||||
@ -1268,7 +1268,7 @@ CURLcode Curl_once_resolved(struct Curl_easy *data, bool *protocol_done)
|
||||
result = Curl_setup_conn(data, protocol_done);
|
||||
|
||||
if(result) {
|
||||
Curl_detach_connnection(data);
|
||||
Curl_detach_connection(data);
|
||||
Curl_conncache_remove_conn(data, conn, TRUE);
|
||||
Curl_disconnect(data, conn, TRUE);
|
||||
}
|
||||
|
||||
18
lib/multi.c
18
lib/multi.c
@ -118,7 +118,7 @@ static void init_completed(struct Curl_easy *data)
|
||||
|
||||
/* Important: reset the conn pointer so that we don't point to memory
|
||||
that could be freed anytime */
|
||||
Curl_detach_connnection(data);
|
||||
Curl_detach_connection(data);
|
||||
Curl_expire_clear(data); /* stop all timers */
|
||||
}
|
||||
|
||||
@ -635,7 +635,7 @@ static CURLcode multi_done(struct Curl_easy *data,
|
||||
process_pending_handles(data->multi); /* connection / multiplex */
|
||||
|
||||
CONNCACHE_LOCK(data);
|
||||
Curl_detach_connnection(data);
|
||||
Curl_detach_connection(data);
|
||||
if(CONN_INUSE(conn)) {
|
||||
/* Stop if still used. */
|
||||
CONNCACHE_UNLOCK(data);
|
||||
@ -824,7 +824,7 @@ CURLMcode curl_multi_remove_handle(struct Curl_multi *multi,
|
||||
that vanish with this handle */
|
||||
|
||||
/* Remove the association between the connection and the handle */
|
||||
Curl_detach_connnection(data);
|
||||
Curl_detach_connection(data);
|
||||
|
||||
if(data->state.lastconnect_id != -1) {
|
||||
/* Mark any connect-only connection for closure */
|
||||
@ -899,12 +899,12 @@ bool Curl_multiplex_wanted(const struct Curl_multi *multi)
|
||||
}
|
||||
|
||||
/*
|
||||
* Curl_detach_connnection() removes the given transfer from the connection.
|
||||
* Curl_detach_connection() removes the given transfer from the connection.
|
||||
*
|
||||
* This is the only function that should clear data->conn. This will
|
||||
* occasionally be called with the data->conn pointer already cleared.
|
||||
*/
|
||||
void Curl_detach_connnection(struct Curl_easy *data)
|
||||
void Curl_detach_connection(struct Curl_easy *data)
|
||||
{
|
||||
struct connectdata *conn = data->conn;
|
||||
if(conn) {
|
||||
@ -916,11 +916,11 @@ void Curl_detach_connnection(struct Curl_easy *data)
|
||||
}
|
||||
|
||||
/*
|
||||
* Curl_attach_connnection() attaches this transfer to this connection.
|
||||
* Curl_attach_connection() attaches this transfer to this connection.
|
||||
*
|
||||
* This is the only function that should assign data->conn
|
||||
*/
|
||||
void Curl_attach_connnection(struct Curl_easy *data,
|
||||
void Curl_attach_connection(struct Curl_easy *data,
|
||||
struct connectdata *conn)
|
||||
{
|
||||
DEBUGASSERT(!data->conn);
|
||||
@ -1540,7 +1540,7 @@ CURLMcode Curl_multi_add_perform(struct Curl_multi *multi,
|
||||
|
||||
/* take this handle to the perform state right away */
|
||||
multistate(data, MSTATE_PERFORMING);
|
||||
Curl_attach_connnection(data, conn);
|
||||
Curl_attach_connection(data, conn);
|
||||
k->keepon |= KEEP_RECV; /* setup to receive! */
|
||||
}
|
||||
return rc;
|
||||
@ -2558,7 +2558,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
|
||||
/* This is where we make sure that the conn pointer is reset.
|
||||
We don't have to do this in every case block above where a
|
||||
failure is detected */
|
||||
Curl_detach_connnection(data);
|
||||
Curl_detach_connection(data);
|
||||
|
||||
/* remove connection from cache */
|
||||
Curl_conncache_remove_conn(data, conn, TRUE);
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
@ -31,9 +31,9 @@ void Curl_expire(struct Curl_easy *data, timediff_t milli, expire_id);
|
||||
void Curl_expire_clear(struct Curl_easy *data);
|
||||
void Curl_expire_done(struct Curl_easy *data, expire_id id);
|
||||
CURLMcode Curl_update_timer(struct Curl_multi *multi) WARN_UNUSED_RESULT;
|
||||
void Curl_attach_connnection(struct Curl_easy *data,
|
||||
void Curl_attach_connection(struct Curl_easy *data,
|
||||
struct connectdata *conn);
|
||||
void Curl_detach_connnection(struct Curl_easy *data);
|
||||
void Curl_detach_connection(struct Curl_easy *data);
|
||||
bool Curl_multiplex_wanted(const struct Curl_multi *multi);
|
||||
void Curl_set_in_callback(struct Curl_easy *data, bool value);
|
||||
bool Curl_is_in_callback(struct Curl_easy *easy);
|
||||
|
||||
18
lib/url.c
18
lib/url.c
@ -372,7 +372,7 @@ CURLcode Curl_close(struct Curl_easy **datap)
|
||||
|
||||
/* Detach connection if any is left. This should not be normal, but can be
|
||||
the case for example with CONNECT_ONLY + recv/send (test 556) */
|
||||
Curl_detach_connnection(data);
|
||||
Curl_detach_connection(data);
|
||||
m = data->multi;
|
||||
if(m)
|
||||
/* This handle is still part of a multi handle, take care of this first
|
||||
@ -859,7 +859,7 @@ void Curl_disconnect(struct Curl_easy *data,
|
||||
|
||||
/* temporarily attach the connection to this transfer handle for the
|
||||
disconnect and shutdown */
|
||||
Curl_attach_connnection(data, conn);
|
||||
Curl_attach_connection(data, conn);
|
||||
|
||||
if(conn->handler->disconnect)
|
||||
/* This is set if protocol-specific cleanups should be made */
|
||||
@ -868,7 +868,7 @@ void Curl_disconnect(struct Curl_easy *data,
|
||||
conn_shutdown(data, conn);
|
||||
|
||||
/* detach it again */
|
||||
Curl_detach_connnection(data);
|
||||
Curl_detach_connection(data);
|
||||
|
||||
conn_free(conn);
|
||||
}
|
||||
@ -1020,12 +1020,12 @@ static bool extract_if_dead(struct connectdata *conn,
|
||||
|
||||
/* briefly attach the connection to this transfer for the purpose of
|
||||
checking it */
|
||||
Curl_attach_connnection(data, conn);
|
||||
Curl_attach_connection(data, conn);
|
||||
|
||||
state = conn->handler->connection_check(data, conn, CONNCHECK_ISDEAD);
|
||||
dead = (state & CONNRESULT_DEAD);
|
||||
/* detach the connection again */
|
||||
Curl_detach_connnection(data);
|
||||
Curl_detach_connection(data);
|
||||
|
||||
}
|
||||
else {
|
||||
@ -1508,7 +1508,7 @@ ConnectionExists(struct Curl_easy *data,
|
||||
|
||||
if(chosen) {
|
||||
/* mark it as used before releasing the lock */
|
||||
Curl_attach_connnection(data, chosen);
|
||||
Curl_attach_connection(data, chosen);
|
||||
CONNCACHE_UNLOCK(data);
|
||||
*usethis = chosen;
|
||||
return TRUE; /* yes, we found one to use! */
|
||||
@ -3779,7 +3779,7 @@ static CURLcode create_conn(struct Curl_easy *data,
|
||||
if(!result) {
|
||||
conn->bits.tcpconnect[FIRSTSOCKET] = TRUE; /* we are "connected */
|
||||
|
||||
Curl_attach_connnection(data, conn);
|
||||
Curl_attach_connection(data, conn);
|
||||
result = Curl_conncache_add_conn(data);
|
||||
if(result)
|
||||
goto out;
|
||||
@ -4006,7 +4006,7 @@ static CURLcode create_conn(struct Curl_easy *data,
|
||||
* This is a brand new connection, so let's store it in the connection
|
||||
* cache of ours!
|
||||
*/
|
||||
Curl_attach_connnection(data, conn);
|
||||
Curl_attach_connection(data, conn);
|
||||
result = Curl_conncache_add_conn(data);
|
||||
if(result)
|
||||
goto out;
|
||||
@ -4153,7 +4153,7 @@ CURLcode Curl_connect(struct Curl_easy *data,
|
||||
else if(result && conn) {
|
||||
/* We're not allowed to return failure with memory left allocated in the
|
||||
connectdata struct, free those here */
|
||||
Curl_detach_connnection(data);
|
||||
Curl_detach_connection(data);
|
||||
Curl_conncache_remove_conn(data, conn, TRUE);
|
||||
Curl_disconnect(data, conn, TRUE);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user