Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openssl-quic: fix unity build, casing, indentation #13044

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions lib/vquic/curl_osslq.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
* Chunk size is large enough to take a full DATA frame */
#define H3_STREAM_WINDOW_SIZE (128 * 1024)
#define H3_STREAM_CHUNK_SIZE (16 * 1024)
/* The pool keeps spares around and half of a full stream windows
/* The pool keeps spares around and half of a full stream window
* seems good. More does not seem to improve performance.
* The benefit of the pool is that stream buffer to not keep
* spares. So memory consumption goes down when streams run empty,
Expand Down Expand Up @@ -100,7 +100,7 @@ typedef unsigned long sslerr_t;
static CURLcode cf_progress_ingress(struct Curl_cfilter *cf,
struct Curl_easy *data);

static const char *SSL_ERROR_to_str(int err)
static const char *osslq_SSL_ERROR_to_str(int err)
{
switch(err) {
case SSL_ERROR_NONE:
Expand Down Expand Up @@ -139,7 +139,7 @@ static const char *SSL_ERROR_to_str(int err)
}

/* Return error string for last OpenSSL error */
static char *ossl_strerror(unsigned long error, char *buf, size_t size)
static char *osslq_strerror(unsigned long error, char *buf, size_t size)
{
DEBUGASSERT(size);
*buf = '\0';
Expand Down Expand Up @@ -381,8 +381,8 @@ static CURLcode cf_osslq_h3conn_add_stream(struct cf_osslq_h3conn *h3,
}

static CURLcode cf_osslq_ssl_err(struct Curl_cfilter *cf,
struct Curl_easy *data,
int detail, CURLcode def_result)
struct Curl_easy *data,
int detail, CURLcode def_result)
{
struct cf_osslq_ctx *ctx = cf->ctx;
CURLcode result = def_result;
Expand Down Expand Up @@ -421,7 +421,7 @@ static CURLcode cf_osslq_ssl_err(struct Curl_cfilter *cf,
/* If client certificate is required, communicate the
error to client */
result = CURLE_SSL_CLIENTCERT;
ossl_strerror(errdetail, ebuf, sizeof(ebuf));
osslq_strerror(errdetail, ebuf, sizeof(ebuf));
}
#endif
else if((lib == ERR_LIB_SSL) && (reason == SSL_R_PROTOCOL_IS_SHUTDOWN)) {
Expand All @@ -431,7 +431,7 @@ static CURLcode cf_osslq_ssl_err(struct Curl_cfilter *cf,
}
else {
result = def_result;
ossl_strerror(errdetail, ebuf, sizeof(ebuf));
osslq_strerror(errdetail, ebuf, sizeof(ebuf));
}

/* detail is already set to the SSL error above */
Expand All @@ -451,7 +451,7 @@ static CURLcode cf_osslq_ssl_err(struct Curl_cfilter *cf,
if(sockerr && detail == SSL_ERROR_SYSCALL)
Curl_strerror(sockerr, extramsg, sizeof(extramsg));
failf(data, "QUIC connect: %s in connection to %s:%d (%s)",
extramsg[0] ? extramsg : SSL_ERROR_to_str(detail),
extramsg[0] ? extramsg : osslq_SSL_ERROR_to_str(detail),
ctx->peer.dispname, r_port, r_ip);
}
else {
Expand Down Expand Up @@ -976,7 +976,7 @@ static nghttp3_callbacks ngh3_callbacks = {
};

static CURLcode cf_osslq_h3conn_init(struct cf_osslq_ctx *ctx, SSL *conn,
void *user_data)
void *user_data)
{
struct cf_osslq_h3conn *h3 = &ctx->h3;
CURLcode result;
Expand Down Expand Up @@ -1083,7 +1083,7 @@ static CURLcode cf_osslq_ctx_start(struct Curl_cfilter *cf,
*/
#if defined(_WIN32) && !defined(__LWIP_OPT_H__) && !defined(LWIP_HDR_OPT_H)
if(ctx->q.sockfd > INT_MAX) {
failf(data, "windows socket identifier larger than MAX_INT, "
failf(data, "Windows socket identifier larger than MAX_INT, "
"unable to set in OpenSSL dgram API.");
result = CURLE_QUIC_CONNECT_ERROR;
goto out;
Expand Down Expand Up @@ -1170,7 +1170,7 @@ static ssize_t h3_quic_recv(void *reader_ctx,
SSL_get_stream_read_error_code(x->s->ssl, &app_error_code);
CURL_TRC_CF(x->data, x->cf, "[%" PRId64 "] h3_quic_recv -> RESET, "
"rv=%d, app_err=%" PRIu64,
x->s->id, rv, app_error_code);
x->s->id, rv, app_error_code);
if(app_error_code != NGHTTP3_H3_NO_ERROR) {
x->s->reset = TRUE;
}
Expand Down Expand Up @@ -1443,7 +1443,7 @@ static CURLcode h3_send_streams(struct Curl_cfilter *cf,
case SSL_ERROR_WANT_READ:
/* QUIC blocked us from writing more */
CURL_TRC_CF(data, cf, "[%"PRId64"] send %zu bytes to QUIC blocked",
s->id, vec[i].len);
s->id, vec[i].len);
written = 0;
nghttp3_conn_block_stream(ctx->h3.conn, s->id);
s->send_blocked = blocked = TRUE;
Expand Down
Loading