comparison src/event/quic/ngx_event_quic_output.c @ 8705:ff473a6f656c quic

QUIC: ngx_quic_send_alert() callback moved to its place.
author Sergey Kandaurov <pluknet@nginx.com>
date Tue, 30 Nov 2021 14:30:59 +0300
parents 095f8a3e143d
children 501f28679d56
comparison
equal deleted inserted replaced
8704:095f8a3e143d 8705:ff473a6f656c
835 835
836 return NGX_ERROR; 836 return NGX_ERROR;
837 } 837 }
838 838
839 839
840 int
841 ngx_quic_send_alert(ngx_ssl_conn_t *ssl_conn, enum ssl_encryption_level_t level,
842 uint8_t alert)
843 {
844 ngx_connection_t *c;
845 ngx_quic_connection_t *qc;
846
847 c = ngx_ssl_get_connection((ngx_ssl_conn_t *) ssl_conn);
848
849 ngx_log_debug2(NGX_LOG_DEBUG_EVENT, c->log, 0,
850 "quic ngx_quic_send_alert() level:%s alert:%d",
851 ngx_quic_level_name(level), (int) alert);
852
853 /* already closed on regular shutdown */
854
855 qc = ngx_quic_get_connection(c);
856 if (qc == NULL) {
857 return 1;
858 }
859
860 qc->error = NGX_QUIC_ERR_CRYPTO(alert);
861
862 return 1;
863 }
864
865
866 ngx_int_t 840 ngx_int_t
867 ngx_quic_send_stateless_reset(ngx_connection_t *c, ngx_quic_conf_t *conf, 841 ngx_quic_send_stateless_reset(ngx_connection_t *c, ngx_quic_conf_t *conf,
868 ngx_quic_header_t *pkt) 842 ngx_quic_header_t *pkt)
869 { 843 {
870 u_char *token; 844 u_char *token;