'Curl_' is a prefix used for library global functions (cross-files).
Static functions should thus not use it.
Closes #15419
return result;
}
-static bool Curl_cf_is_http2(struct Curl_cfilter *cf,
- const struct Curl_easy *data)
+static bool cf_is_http2(struct Curl_cfilter *cf,
+ const struct Curl_easy *data)
{
(void)data;
for(; cf; cf = cf->next) {
const struct connectdata *conn,
int sockindex)
{
- return conn ? Curl_cf_is_http2(conn->cfilter[sockindex], data) : FALSE;
+ return conn ? cf_is_http2(conn->cfilter[sockindex], data) : FALSE;
}
bool Curl_http2_may_switch(struct Curl_easy *data,
struct Curl_cfilter *cf_h2;
CURLcode result;
- DEBUGASSERT(!Curl_cf_is_http2(cf, data));
+ DEBUGASSERT(!cf_is_http2(cf, data));
result = http2_cfilter_insert_after(cf, data, FALSE);
if(result)
long *timeout_ms);
static void process_pending_handles(struct Curl_multi *multi);
static void multi_xfer_bufs_free(struct Curl_multi *multi);
-static void Curl_expire_ex(struct Curl_easy *data, const struct curltime *nowp,
- timediff_t milli, expire_id id);
+static void expire_ex(struct Curl_easy *data, const struct curltime *nowp,
+ timediff_t milli, expire_id id);
#if defined( DEBUGBUILD) && !defined(CURL_DISABLE_VERBOSE_STRINGS)
static const char * const multi_statename[]={
else {
/* Expire with out current now, so we will get it below when
* asking the splaytree for expired transfers. */
- Curl_expire_ex(data, &mrc.now, 0, EXPIRE_RUN_NOW);
+ expire_ex(data, &mrc.now, 0, EXPIRE_RUN_NOW);
}
}
}
return CURLM_OK;
}
-/*
- * Curl_expire()
- *
- * given a number of milliseconds from now to use to set the 'act before
- * this'-time for the transfer, to be extracted by curl_multi_timeout()
- *
- * The timeout will be added to a queue of timeouts if it defines a moment in
- * time that is later than the current head of queue.
- *
- * Expire replaces a former timeout using the same id if already set.
- */
-static void Curl_expire_ex(struct Curl_easy *data,
- const struct curltime *nowp,
- timediff_t milli, expire_id id)
+static void expire_ex(struct Curl_easy *data,
+ const struct curltime *nowp,
+ timediff_t milli, expire_id id)
{
struct Curl_multi *multi = data->multi;
struct curltime *curr_expire = &data->state.expiretime;
&data->state.timenode);
}
+/*
+ * Curl_expire()
+ *
+ * given a number of milliseconds from now to use to set the 'act before
+ * this'-time for the transfer, to be extracted by curl_multi_timeout()
+ *
+ * The timeout will be added to a queue of timeouts if it defines a moment in
+ * time that is later than the current head of queue.
+ *
+ * Expire replaces a former timeout using the same id if already set.
+ */
void Curl_expire(struct Curl_easy *data, timediff_t milli, expire_id id)
{
struct curltime now = Curl_now();
- Curl_expire_ex(data, &now, milli, id);
+ expire_ex(data, &now, milli, id);
}
/*
* @param err error code in case of -1 return
* @return number of bytes read or -1 for error
*/
-static ssize_t Curl_xfer_recv_resp(struct Curl_easy *data,
- char *buf, size_t blen,
- bool eos_reliable,
- CURLcode *err)
+static ssize_t xfer_recv_resp(struct Curl_easy *data,
+ char *buf, size_t blen,
+ bool eos_reliable,
+ CURLcode *err)
{
ssize_t nread;
bytestoread = (size_t)data->set.max_recv_speed;
}
- nread = Curl_xfer_recv_resp(data, buf, bytestoread,
- is_multiplex, &result);
+ nread = xfer_recv_resp(data, buf, bytestoread, is_multiplex, &result);
if(nread < 0) {
if(CURLE_AGAIN != result)
goto out; /* real error */
}
/*
- * Curl_xfer_may_multiplex()
+ * xfer_may_multiplex()
*
* Return a TRUE, iff the transfer can be done over an (appropriate)
* multiplexed connection.
*/
-static bool Curl_xfer_may_multiplex(const struct Curl_easy *data,
- const struct connectdata *conn)
+static bool xfer_may_multiplex(const struct Curl_easy *data,
+ const struct connectdata *conn)
{
/* If an HTTP protocol and multiplexing is enabled */
if((conn->handler->protocol & PROTO_FAMILY_HTTP) &&
memset(&match, 0, sizeof(match));
match.data = data;
match.needle = needle;
- match.may_multiplex = Curl_xfer_may_multiplex(data, needle);
+ match.may_multiplex = xfer_may_multiplex(data, needle);
#ifdef USE_NTLM
match.want_ntlm_http = ((data->state.authhost.want & CURLAUTH_NTLM) &&
}
#endif
-static CURLcode Curl_wssl_init_ctx(struct curl_tls_ctx *ctx,
- struct Curl_cfilter *cf,
- struct Curl_easy *data,
- Curl_vquic_tls_ctx_setup *cb_setup,
- void *cb_user_data)
+static CURLcode wssl_init_ctx(struct curl_tls_ctx *ctx,
+ struct Curl_cfilter *cf,
+ struct Curl_easy *data,
+ Curl_vquic_tls_ctx_setup *cb_setup,
+ void *cb_user_data)
{
struct ssl_primary_config *conn_config;
CURLcode result = CURLE_FAILED_INIT;
/** SSL callbacks ***/
-static CURLcode Curl_wssl_init_ssl(struct curl_tls_ctx *ctx,
- struct Curl_cfilter *cf,
- struct Curl_easy *data,
- struct ssl_peer *peer,
- const char *alpn, size_t alpn_len,
- void *user_data)
+static CURLcode wssl_init_ssl(struct curl_tls_ctx *ctx,
+ struct Curl_cfilter *cf,
+ struct Curl_easy *data,
+ struct ssl_peer *peer,
+ const char *alpn, size_t alpn_len,
+ void *user_data)
{
struct ssl_config_data *ssl_config = Curl_ssl_cf_get_config(cf, data);
(const unsigned char *)alpn, alpn_len, NULL,
cb_setup, cb_user_data, ssl_user_data);
#elif defined(USE_WOLFSSL)
- result = Curl_wssl_init_ctx(ctx, cf, data, cb_setup, cb_user_data);
+ result = wssl_init_ctx(ctx, cf, data, cb_setup, cb_user_data);
if(result)
return result;
- return Curl_wssl_init_ssl(ctx, cf, data, peer, alpn, alpn_len,
- ssl_user_data);
+ return wssl_init_ssl(ctx, cf, data, peer, alpn, alpn_len, ssl_user_data);
#else
#error "no TLS lib in used, should not happen"
return CURLE_FAILED_INIT;
return TRUE;
}
-static void Curl_free_primary_ssl_config(struct ssl_primary_config *sslc)
+static void free_primary_ssl_config(struct ssl_primary_config *sslc)
{
Curl_safefree(sslc->CApath);
Curl_safefree(sslc->CAfile);
void Curl_ssl_conn_config_cleanup(struct connectdata *conn)
{
- Curl_free_primary_ssl_config(&conn->ssl_config);
+ free_primary_ssl_config(&conn->ssl_config);
#ifndef CURL_DISABLE_PROXY
- Curl_free_primary_ssl_config(&conn->proxy_ssl_config);
+ free_primary_ssl_config(&conn->proxy_ssl_config);
#endif
}
session->sessionid_free = NULL;
session->age = 0; /* fresh */
- Curl_free_primary_ssl_config(&session->ssl_config);
+ free_primary_ssl_config(&session->ssl_config);
Curl_safefree(session->name);
Curl_safefree(session->conn_to_host);
/* now init the session struct wisely */
if(!clone_ssl_primary_config(conn_config, &store->ssl_config)) {
- Curl_free_primary_ssl_config(&store->ssl_config);
+ free_primary_ssl_config(&store->ssl_config);
store->sessionid = NULL; /* let caller free sessionid */
goto out;
}