# HG changeset patch # User Sergey Kandaurov # Date 1645015547 -10800 # Node ID a2fbae3598282f53540313b83a4272269e9aee8e # Parent 8d11e21716978223f37657001c9c0e7f8723be23 QUIC: fixed indentation. diff --git a/src/event/quic/bpf/ngx_quic_reuseport_helper.c b/src/event/quic/bpf/ngx_quic_reuseport_helper.c --- a/src/event/quic/bpf/ngx_quic_reuseport_helper.c +++ b/src/event/quic/bpf/ngx_quic_reuseport_helper.c @@ -126,7 +126,7 @@ int ngx_quic_select_socket_by_dcid(struc default: debugmsg("nginx quic bpf_sk_select_reuseport err: %d key 0x%llx", - rc, key); + rc, key); goto failed; } diff --git a/src/event/quic/ngx_event_quic.c b/src/event/quic/ngx_event_quic.c --- a/src/event/quic/ngx_event_quic.c +++ b/src/event/quic/ngx_event_quic.c @@ -491,9 +491,9 @@ ngx_quic_close_connection(ngx_connection /* this case also handles some errors from ngx_quic_run() */ - ngx_log_debug2(NGX_LOG_DEBUG_EVENT, c->log, 0, - "quic close silent drain:%d timedout:%d", - qc->draining, c->read->timedout); + ngx_log_debug2(NGX_LOG_DEBUG_EVENT, c->log, 0, + "quic close silent drain:%d timedout:%d", + qc->draining, c->read->timedout); } else { /* @@ -816,7 +816,7 @@ ngx_quic_handle_packet(ngx_connection_t { /* packet comes from unknown path, possibly migration */ ngx_log_debug0(NGX_LOG_DEBUG_EVENT, c->log, 0, - "quic too early migration attempt"); + "quic too early migration attempt"); return NGX_DONE; } } diff --git a/src/event/quic/ngx_event_quic_ack.c b/src/event/quic/ngx_event_quic_ack.c --- a/src/event/quic/ngx_event_quic_ack.c +++ b/src/event/quic/ngx_event_quic_ack.c @@ -834,7 +834,7 @@ ngx_quic_pto_handler(ngx_event_t *ev) for (i = 0; i < NGX_QUIC_SEND_CTX_LAST; i++) { - ctx = &qc->send_ctx[i]; + ctx = &qc->send_ctx[i]; if (ngx_queue_empty(&ctx->sent)) { continue; @@ -1166,7 +1166,7 @@ ngx_quic_generate_ack(ngx_connection_t * return NGX_OK; } - if (ctx->level == ssl_encryption_application) { + if (ctx->level == ssl_encryption_application) { delay = ngx_current_msec - ctx->ack_delay_start; qc = ngx_quic_get_connection(c); diff --git a/src/event/quic/ngx_event_quic_migration.c b/src/event/quic/ngx_event_quic_migration.c --- a/src/event/quic/ngx_event_quic_migration.c +++ b/src/event/quic/ngx_event_quic_migration.c @@ -108,7 +108,7 @@ ngx_quic_handle_path_response_frame(ngx_ } ngx_log_debug0(NGX_LOG_DEBUG_EVENT, c->log, 0, - "quic stale PATH_RESPONSE ignored"); + "quic stale PATH_RESPONSE ignored"); return NGX_OK; @@ -387,7 +387,7 @@ ngx_quic_set_connection_path(ngx_connect { size_t len; - ngx_memcpy(c->sockaddr, path->sockaddr, path->socklen); + ngx_memcpy(c->sockaddr, path->sockaddr, path->socklen); c->socklen = path->socklen; if (c->addr_text.data) { diff --git a/src/event/quic/ngx_event_quic_socket.c b/src/event/quic/ngx_event_quic_socket.c --- a/src/event/quic/ngx_event_quic_socket.c +++ b/src/event/quic/ngx_event_quic_socket.c @@ -38,7 +38,7 @@ ngx_quic_open_sockets(ngx_connection_t * qc->tp.original_dcid.len = pkt->odcid.len; qc->tp.original_dcid.data = ngx_pstrdup(c->pool, &pkt->odcid); if (qc->tp.original_dcid.data == NULL) { - return NGX_ERROR; + return NGX_ERROR; } /* socket to use for further processing (id auto-generated) */ diff --git a/src/event/quic/ngx_event_quic_ssl.c b/src/event/quic/ngx_event_quic_ssl.c --- a/src/event/quic/ngx_event_quic_ssl.c +++ b/src/event/quic/ngx_event_quic_ssl.c @@ -212,16 +212,16 @@ ngx_quic_add_handshake_data(ngx_ssl_conn #if defined(TLSEXT_TYPE_application_layer_protocol_negotiation) - SSL_get0_alpn_selected(ssl_conn, &alpn_data, &alpn_len); + SSL_get0_alpn_selected(ssl_conn, &alpn_data, &alpn_len); - if (alpn_len == 0) { - qc->error = 0x100 + SSL_AD_NO_APPLICATION_PROTOCOL; - qc->error_reason = "unsupported protocol in ALPN extension"; + if (alpn_len == 0) { + qc->error = 0x100 + SSL_AD_NO_APPLICATION_PROTOCOL; + qc->error_reason = "unsupported protocol in ALPN extension"; - ngx_log_error(NGX_LOG_INFO, c->log, 0, - "quic unsupported protocol in ALPN extension"); - return 0; - } + ngx_log_error(NGX_LOG_INFO, c->log, 0, + "quic unsupported protocol in ALPN extension"); + return 0; + } #endif diff --git a/src/event/quic/ngx_event_quic_tokens.c b/src/event/quic/ngx_event_quic_tokens.c --- a/src/event/quic/ngx_event_quic_tokens.c +++ b/src/event/quic/ngx_event_quic_tokens.c @@ -27,7 +27,7 @@ ngx_int_t ngx_quic_new_sr_token(ngx_connection_t *c, ngx_str_t *cid, u_char *secret, u_char *token) { - ngx_str_t tmp; + ngx_str_t tmp; tmp.data = secret; tmp.len = NGX_QUIC_SR_KEY_LEN; diff --git a/src/event/quic/ngx_event_quic_transport.c b/src/event/quic/ngx_event_quic_transport.c --- a/src/event/quic/ngx_event_quic_transport.c +++ b/src/event/quic/ngx_event_quic_transport.c @@ -588,7 +588,7 @@ ngx_quic_payload_size(ngx_quic_header_t /* flags, version, dcid and scid with lengths and zero-length token */ len = 5 + 2 + pkt->dcid.len + pkt->scid.len - + (pkt->level == ssl_encryption_initial ? 1 : 0); + + (pkt->level == ssl_encryption_initial ? 1 : 0); if (len > pkt_len) { return 0; @@ -1052,7 +1052,7 @@ ngx_quic_parse_frame(ngx_quic_header_t * goto error; } - p = ngx_quic_parse_int(p, end, &f->u.max_stream_data.limit); + p = ngx_quic_parse_int(p, end, &f->u.max_stream_data.limit); if (p == NULL) { goto error; } @@ -1555,7 +1555,7 @@ ngx_quic_create_max_streams(u_char *p, n u_char *start; ngx_uint_t type; - type = ms->bidi ? NGX_QUIC_FT_MAX_STREAMS : NGX_QUIC_FT_MAX_STREAMS2; + type = ms->bidi ? NGX_QUIC_FT_MAX_STREAMS : NGX_QUIC_FT_MAX_STREAMS2; if (p == NULL) { len = ngx_quic_varint_len(type);