CLEANUP: quic_frame: Remove a useless suffix to STOP_SENDING

This is to be consistent with the other frame names. Adding a _frame
suffixe to STOP_SENDING is useless. We know this is a frame.
This commit is contained in:
Frédéric Lécaille 2021-12-10 14:42:02 +01:00 committed by Amaury Denoyelle
parent f57c333ac1
commit 1d2faa24d2
3 changed files with 9 additions and 9 deletions

View File

@ -126,7 +126,7 @@ struct quic_reset_stream {
uint64_t final_size; uint64_t final_size;
}; };
struct quic_stop_sending_frame { struct quic_stop_sending {
uint64_t id; uint64_t id;
uint64_t app_error_code; uint64_t app_error_code;
}; };
@ -224,7 +224,7 @@ struct quic_frame {
struct quic_tx_ack tx_ack; struct quic_tx_ack tx_ack;
struct quic_crypto crypto; struct quic_crypto crypto;
struct quic_reset_stream reset_stream; struct quic_reset_stream reset_stream;
struct quic_stop_sending_frame stop_sending_frame; struct quic_stop_sending stop_sending;
struct quic_new_token new_token; struct quic_new_token new_token;
struct quic_stream stream; struct quic_stream stream;
struct quic_max_data max_data; struct quic_max_data max_data;

View File

@ -55,7 +55,7 @@ static inline size_t qc_frm_len(struct quic_frame *frm)
break; break;
} }
case QUIC_FT_STOP_SENDING: { case QUIC_FT_STOP_SENDING: {
struct quic_stop_sending_frame *f = &frm->stop_sending_frame; struct quic_stop_sending *f = &frm->stop_sending;
len += 1 + quic_int_getsize(f->id) + quic_int_getsize(f->app_error_code); len += 1 + quic_int_getsize(f->id) + quic_int_getsize(f->app_error_code);
break; break;
} }

View File

@ -264,10 +264,10 @@ static int quic_parse_reset_stream_frame(struct quic_frame *frm, struct quic_con
static int quic_build_stop_sending_frame(unsigned char **buf, const unsigned char *end, static int quic_build_stop_sending_frame(unsigned char **buf, const unsigned char *end,
struct quic_frame *frm, struct quic_conn *conn) struct quic_frame *frm, struct quic_conn *conn)
{ {
struct quic_stop_sending_frame *stop_sending_frame = &frm->stop_sending_frame; struct quic_stop_sending *stop_sending = &frm->stop_sending;
return quic_enc_int(buf, end, stop_sending_frame->id) && return quic_enc_int(buf, end, stop_sending->id) &&
quic_enc_int(buf, end, stop_sending_frame->app_error_code); quic_enc_int(buf, end, stop_sending->app_error_code);
} }
/* Parse a STOP_SENDING frame from <buf> buffer with <end> as end into <frm> frame. /* Parse a STOP_SENDING frame from <buf> buffer with <end> as end into <frm> frame.
@ -276,10 +276,10 @@ static int quic_build_stop_sending_frame(unsigned char **buf, const unsigned cha
static int quic_parse_stop_sending_frame(struct quic_frame *frm, struct quic_conn *qc, static int quic_parse_stop_sending_frame(struct quic_frame *frm, struct quic_conn *qc,
const unsigned char **buf, const unsigned char *end) const unsigned char **buf, const unsigned char *end)
{ {
struct quic_stop_sending_frame *stop_sending_frame = &frm->stop_sending_frame; struct quic_stop_sending *stop_sending = &frm->stop_sending;
return quic_dec_int(&stop_sending_frame->id, buf, end) && return quic_dec_int(&stop_sending->id, buf, end) &&
quic_dec_int(&stop_sending_frame->app_error_code, buf, end); quic_dec_int(&stop_sending->app_error_code, buf, end);
} }
/* Encode a CRYPTO frame into <buf> buffer. /* Encode a CRYPTO frame into <buf> buffer.