Make settings_id 2 bytes field
This commit is contained in:
parent
458ccb3681
commit
d402ba6fa2
|
@ -513,8 +513,8 @@ size_t nghttp2_frame_pack_settings_payload(uint8_t *buf,
|
||||||
{
|
{
|
||||||
size_t i;
|
size_t i;
|
||||||
for(i = 0; i < niv; ++i, buf += NGHTTP2_FRAME_SETTINGS_ENTRY_LENGTH) {
|
for(i = 0; i < niv; ++i, buf += NGHTTP2_FRAME_SETTINGS_ENTRY_LENGTH) {
|
||||||
buf[0] = iv[i].settings_id;
|
nghttp2_put_uint16be(buf, iv[i].settings_id);
|
||||||
nghttp2_put_uint32be(buf + 1, iv[i].value);
|
nghttp2_put_uint32be(buf + 2, iv[i].value);
|
||||||
}
|
}
|
||||||
return NGHTTP2_FRAME_SETTINGS_ENTRY_LENGTH * niv;
|
return NGHTTP2_FRAME_SETTINGS_ENTRY_LENGTH * niv;
|
||||||
}
|
}
|
||||||
|
@ -544,8 +544,8 @@ int nghttp2_frame_unpack_settings_payload(nghttp2_settings *frame,
|
||||||
void nghttp2_frame_unpack_settings_entry(nghttp2_settings_entry *iv,
|
void nghttp2_frame_unpack_settings_entry(nghttp2_settings_entry *iv,
|
||||||
const uint8_t *payload)
|
const uint8_t *payload)
|
||||||
{
|
{
|
||||||
iv->settings_id = payload[0];
|
iv->settings_id = nghttp2_get_uint16(&payload[0]);
|
||||||
iv->value = nghttp2_get_uint32(&payload[1]);
|
iv->value = nghttp2_get_uint32(&payload[2]);
|
||||||
}
|
}
|
||||||
|
|
||||||
int nghttp2_frame_unpack_settings_payload2(nghttp2_settings_entry **iv_ptr,
|
int nghttp2_frame_unpack_settings_payload2(nghttp2_settings_entry **iv_ptr,
|
||||||
|
|
|
@ -55,7 +55,7 @@
|
||||||
#define NGHTTP2_DATA_PAYLOADLEN 4096
|
#define NGHTTP2_DATA_PAYLOADLEN 4096
|
||||||
|
|
||||||
/* The number of bytes for each SETTINGS entry */
|
/* The number of bytes for each SETTINGS entry */
|
||||||
#define NGHTTP2_FRAME_SETTINGS_ENTRY_LENGTH 5
|
#define NGHTTP2_FRAME_SETTINGS_ENTRY_LENGTH 6
|
||||||
|
|
||||||
/* The maximum header table size in SETTINGS_HEADER_TABLE_SIZE */
|
/* The maximum header table size in SETTINGS_HEADER_TABLE_SIZE */
|
||||||
#define NGHTTP2_MAX_HEADER_TABLE_SIZE ((1u << 31) - 1)
|
#define NGHTTP2_MAX_HEADER_TABLE_SIZE ((1u << 31) - 1)
|
||||||
|
|
Loading…
Reference in New Issue