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.
This commit is contained in:
Tatsuhiro Tsujikawa 2013-09-09 21:30:39 +09:00
parent b7e1701f06
commit 98273b7db1
4 changed files with 12 additions and 10 deletions

View File

@ -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

View File

@ -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;

View File

@ -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);
/*

View File

@ -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) */