Commit 98273b7d authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

nghttp2_pack_settings_payload: Make iv const

The reordering iv in the comment is no longer applied to the current
code base, therefore it is removed and iv is made to const pointer.
parent b7e1701f
......@@ -1506,12 +1506,12 @@ int nghttp2_session_upgrade(nghttp2_session *session,
/**
* @function
*
* Serializes the SETTINGS values |iv| in the |buf|. The size of the |buf| is
* specified by |buflen|. The number of entries in the |iv| array is given by
* |niv|. This function may reorder the pointers in |iv|. The required space
* in |buf| for the |niv| entries is ``8*niv`` bytes and if the given buffer
* is too small, an error is returned. This function is used mainly for
* creating a SETTINGS payload to be sent with the ``HTTP2-Settings`` header
* Serializes the SETTINGS values |iv| in the |buf|. The size of the
* |buf| is specified by |buflen|. The number of entries in the |iv|
* array is given by |niv|. The required space in |buf| for the |niv|
* entries is ``8*niv`` bytes and if the given buffer is too small, an
* error is returned. This function is used mainly for creating a
* SETTINGS payload to be sent with the ``HTTP2-Settings`` header
* field in an HTTP Upgrade request. The data written in |buf| is NOT
* base64url encoded and the application is responsible for encoding.
*
......@@ -1526,7 +1526,8 @@ int nghttp2_session_upgrade(nghttp2_session *session,
*/
ssize_t nghttp2_pack_settings_payload(uint8_t *buf,
size_t buflen,
nghttp2_settings_entry *iv, size_t niv);
const nghttp2_settings_entry *iv,
size_t niv);
/**
* @function
......
......@@ -356,7 +356,7 @@ ssize_t nghttp2_frame_pack_settings(uint8_t **buf_ptr, size_t *buflen_ptr,
}
size_t nghttp2_frame_pack_settings_payload(uint8_t *buf,
nghttp2_settings_entry *iv,
const nghttp2_settings_entry *iv,
size_t niv)
{
size_t i;
......
......@@ -237,7 +237,7 @@ ssize_t nghttp2_frame_pack_settings(uint8_t **buf_ptr, size_t *buflen_ptr,
* Returns the number of bytes written into the |buf|.
*/
size_t nghttp2_frame_pack_settings_payload(uint8_t *buf,
nghttp2_settings_entry *iv,
const nghttp2_settings_entry *iv,
size_t niv);
/*
......
......@@ -349,7 +349,8 @@ int nghttp2_submit_data(nghttp2_session *session, uint8_t flags,
ssize_t nghttp2_pack_settings_payload(uint8_t *buf,
size_t buflen,
nghttp2_settings_entry *iv, size_t niv)
const nghttp2_settings_entry *iv,
size_t niv)
{
/* Assume that current flow_control_option is 0 (which means that
flow control is enabled) */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment