curl_log: for failf/infof and debug logging implementations

- new functions and macros for cfilter debugging
 - set CURL_DEBUG with names of cfilters where debug logging should be
   enabled
 - use GNUC __attribute__ to enable printf format checks during compile

Closes #10271
This commit is contained in:
Stefan Eissing 2023-01-11 10:30:42 +01:00 committed by Daniel Stenberg
parent 5cf5bfcd13
commit db91dbbf2c
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
29 changed files with 656 additions and 466 deletions

View file

@ -1221,9 +1221,10 @@ static void socks_cf_get_host(struct Curl_cfilter *cf,
}
}
static const struct Curl_cftype cft_socks_proxy = {
struct Curl_cftype Curl_cft_socks_proxy = {
"SOCKS-PROXYY",
CF_TYPE_IP_CONNECT,
0,
socks_proxy_cf_destroy,
socks_proxy_cf_connect,
socks_proxy_cf_close,
@ -1245,7 +1246,7 @@ CURLcode Curl_conn_socks_proxy_add(struct Curl_easy *data,
struct Curl_cfilter *cf;
CURLcode result;
result = Curl_cf_create(&cf, &cft_socks_proxy, NULL);
result = Curl_cf_create(&cf, &Curl_cft_socks_proxy, NULL);
if(!result)
Curl_conn_cf_add(data, conn, sockindex, cf);
return result;
@ -1258,7 +1259,7 @@ CURLcode Curl_cf_socks_proxy_insert_after(struct Curl_cfilter *cf_at,
CURLcode result;
(void)data;
result = Curl_cf_create(&cf, &cft_socks_proxy, NULL);
result = Curl_cf_create(&cf, &Curl_cft_socks_proxy, NULL);
if(!result)
Curl_conn_cf_insert_after(cf_at, cf);
return result;