]> git.kaiwu.me - nginx.git/commitdiff
QUIC: fixed indentation.
authorSergey Kandaurov <pluknet@nginx.com>
Wed, 16 Feb 2022 12:45:47 +0000 (15:45 +0300)
committerSergey Kandaurov <pluknet@nginx.com>
Wed, 16 Feb 2022 12:45:47 +0000 (15:45 +0300)
src/event/quic/bpf/ngx_quic_reuseport_helper.c
src/event/quic/ngx_event_quic.c
src/event/quic/ngx_event_quic_ack.c
src/event/quic/ngx_event_quic_migration.c
src/event/quic/ngx_event_quic_socket.c
src/event/quic/ngx_event_quic_ssl.c
src/event/quic/ngx_event_quic_tokens.c
src/event/quic/ngx_event_quic_transport.c

index 2de9b2864dc0580053990e7ad104839f7c0af878..999e7607c7a5663946b10448d616354d5a9980c9 100644 (file)
@@ -126,7 +126,7 @@ int ngx_quic_select_socket_by_dcid(struct sk_reuseport_md *ctx)
 
     default:
         debugmsg("nginx quic bpf_sk_select_reuseport err: %d key 0x%llx",
-                  rc, key);
+                 rc, key);
         goto failed;
     }
 
index 8ef559daeb67daf5685e617b5dbd0a513cc17a5d..96884cd44f749d1fad069f0e444ddc26fcc90275 100644 (file)
@@ -491,9 +491,9 @@ ngx_quic_close_connection(ngx_connection_t *c, ngx_int_t rc)
 
             /* 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 *c, ngx_quic_conf_t *conf,
                 {
                     /* 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;
                 }
             }
index 8b10e9e467684af0a11b3d908e4bf14d12f97bde..1d530c85a1ae05fb8404d29b422698cc27b58b88 100644 (file)
@@ -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 *c, ngx_quic_send_ctx_t *ctx)
         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);
index 6597923da6d6eb79dc9c81b41f08fe37de72c9c7..e07c532509616968b9884d8d4eabdcc2fdec0288 100644 (file)
@@ -108,7 +108,7 @@ ngx_quic_handle_path_response_frame(ngx_connection_t *c,
     }
 
     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_connection_t *c, ngx_quic_path_t *path)
 {
     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) {
index 44387fd3c96517e3e29d88ab56b20d6bcab670d3..c9e1b603c677f098b0351c0f77c5a0929c555294 100644 (file)
@@ -38,7 +38,7 @@ ngx_quic_open_sockets(ngx_connection_t *c, ngx_quic_connection_t *qc,
     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) */
index 0065661412d731f22932c09c3bfaec955f3b5b46..41a0ccff88b6970ba4a5588863643e8cfc88427e 100644 (file)
@@ -212,16 +212,16 @@ ngx_quic_add_handshake_data(ngx_ssl_conn_t *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
 
index 5b1a9df46e7253b485f51ec0afc07d1efb883472..b91134516468af2f97c840f5c2b4aa5735c46104 100644 (file)
@@ -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;
index edd7c6b9fea08ceefc3f86626a3b7a3d84fc3126..660038461aed85b1952d5be7c7f709be14c0b93b 100644 (file)
@@ -588,7 +588,7 @@ ngx_quic_payload_size(ngx_quic_header_t *pkt, size_t pkt_len)
 
     /* 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 *pkt, u_char *start, u_char *end,
             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, ngx_quic_max_streams_frame_t *ms)
     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);