Rename NGHTTP2_DATA_PAYLOAD_LENGTH as NGHTTP2_DATA_PAYLOADLEN

This commit is contained in:
Tatsuhiro Tsujikawa 2014-04-02 20:35:07 +09:00
parent 9c4c99bf96
commit 2685e3405f
3 changed files with 13 additions and 13 deletions

View File

@ -52,7 +52,7 @@
(NGHTTP2_FRAME_HDLEN + 2 + NGHTTP2_MAX_PAYLOADLEN)
/* The maximum length of DATA frame payload. */
#define NGHTTP2_DATA_PAYLOAD_LENGTH 4096
#define NGHTTP2_DATA_PAYLOADLEN 4096
/* The number of bytes for each SETTINGS entry */
#define NGHTTP2_FRAME_SETTINGS_ENTRY_LENGTH 5

View File

@ -1331,7 +1331,7 @@ static int nghttp2_session_predicate_settings_send(nghttp2_session *session,
static size_t nghttp2_session_next_data_read(nghttp2_session *session,
nghttp2_stream *stream)
{
int32_t window_size = NGHTTP2_DATA_PAYLOAD_LENGTH;
int32_t window_size = NGHTTP2_DATA_PAYLOADLEN;
DEBUGF(fprintf(stderr,
"send: remote windowsize connection=%d, "

View File

@ -2645,7 +2645,7 @@ void test_nghttp2_submit_data(void)
callbacks.send_callback = block_count_send_callback;
data_prd.read_callback = fixed_length_data_source_read_callback;
ud.data_source_length = NGHTTP2_DATA_PAYLOAD_LENGTH * 2;
ud.data_source_length = NGHTTP2_DATA_PAYLOADLEN * 2;
CU_ASSERT(0 == nghttp2_session_client_new(&session, &callbacks, &ud));
aob = &session->aob;
framebufs = &aob->framebufs;
@ -3884,7 +3884,7 @@ void test_nghttp2_session_stop_data_with_rst_stream(void)
data_prd.read_callback = fixed_length_data_source_read_callback;
ud.frame_send_cb_called = 0;
ud.data_source_length = NGHTTP2_DATA_PAYLOAD_LENGTH * 4;
ud.data_source_length = NGHTTP2_DATA_PAYLOADLEN * 4;
nghttp2_session_server_new(&session, &callbacks, &ud);
nghttp2_session_open_stream(session, 1, NGHTTP2_STREAM_FLAG_NONE,
@ -3897,7 +3897,7 @@ void test_nghttp2_session_stop_data_with_rst_stream(void)
CU_ASSERT(0 == nghttp2_session_send(session));
CU_ASSERT(NGHTTP2_DATA == ud.sent_frame_type);
/* data for DATA[1] is read from data_prd but it is not sent */
CU_ASSERT(ud.data_source_length == NGHTTP2_DATA_PAYLOAD_LENGTH * 2);
CU_ASSERT(ud.data_source_length == NGHTTP2_DATA_PAYLOADLEN * 2);
nghttp2_frame_rst_stream_init(&frame.rst_stream, 1, NGHTTP2_CANCEL);
CU_ASSERT(0 == nghttp2_session_on_rst_stream_received(session, &frame));
@ -3909,7 +3909,7 @@ void test_nghttp2_session_stop_data_with_rst_stream(void)
CU_ASSERT(0 == nghttp2_session_send(session));
/* With RST_STREAM, stream is canceled and further DATA on that
stream are not sent. */
CU_ASSERT(ud.data_source_length == NGHTTP2_DATA_PAYLOAD_LENGTH * 2);
CU_ASSERT(ud.data_source_length == NGHTTP2_DATA_PAYLOADLEN * 2);
CU_ASSERT(NULL == nghttp2_session_get_stream(session, 1));
@ -3930,7 +3930,7 @@ void test_nghttp2_session_defer_data(void)
data_prd.read_callback = defer_data_source_read_callback;
ud.frame_send_cb_called = 0;
ud.data_source_length = NGHTTP2_DATA_PAYLOAD_LENGTH * 4;
ud.data_source_length = NGHTTP2_DATA_PAYLOADLEN * 4;
nghttp2_session_server_new(&session, &callbacks, &ud);
nghttp2_session_open_stream(session, 1, NGHTTP2_STREAM_FLAG_NONE,
@ -3943,7 +3943,7 @@ void test_nghttp2_session_defer_data(void)
CU_ASSERT(0 == nghttp2_session_send(session));
CU_ASSERT(NGHTTP2_HEADERS == ud.sent_frame_type);
/* No data is read */
CU_ASSERT(ud.data_source_length == NGHTTP2_DATA_PAYLOAD_LENGTH * 4);
CU_ASSERT(ud.data_source_length == NGHTTP2_DATA_PAYLOADLEN * 4);
ud.block_count = 1;
nghttp2_submit_ping(session, NGHTTP2_FLAG_NONE, NULL);
@ -3959,7 +3959,7 @@ void test_nghttp2_session_defer_data(void)
ud.block_count = 1;
/* Reads 2 DATA chunks */
CU_ASSERT(0 == nghttp2_session_send(session));
CU_ASSERT(ud.data_source_length == NGHTTP2_DATA_PAYLOAD_LENGTH * 2);
CU_ASSERT(ud.data_source_length == NGHTTP2_DATA_PAYLOADLEN * 2);
/* Deferred again */
OB_DATA(item)->data_prd.read_callback = defer_data_source_read_callback;
@ -3967,7 +3967,7 @@ void test_nghttp2_session_defer_data(void)
sent. No read_callback invocation. */
ud.block_count = 1;
CU_ASSERT(0 == nghttp2_session_send(session));
CU_ASSERT(ud.data_source_length == NGHTTP2_DATA_PAYLOAD_LENGTH * 2);
CU_ASSERT(ud.data_source_length == NGHTTP2_DATA_PAYLOADLEN * 2);
/* Resume deferred DATA */
@ -4528,7 +4528,7 @@ void test_nghttp2_session_data_backoff_by_high_pri_frame(void)
data_prd.read_callback = fixed_length_data_source_read_callback;
ud.frame_send_cb_called = 0;
ud.data_source_length = NGHTTP2_DATA_PAYLOAD_LENGTH * 4;
ud.data_source_length = NGHTTP2_DATA_PAYLOADLEN * 4;
nghttp2_session_client_new(&session, &callbacks, &ud);
nghttp2_submit_request(session, NULL, NULL, 0, &data_prd, NULL);
@ -4538,7 +4538,7 @@ void test_nghttp2_session_data_backoff_by_high_pri_frame(void)
CU_ASSERT(0 == nghttp2_session_send(session));
CU_ASSERT(NGHTTP2_DATA == ud.sent_frame_type);
/* data for DATA[1] is read from data_prd but it is not sent */
CU_ASSERT(ud.data_source_length == NGHTTP2_DATA_PAYLOAD_LENGTH * 2);
CU_ASSERT(ud.data_source_length == NGHTTP2_DATA_PAYLOADLEN * 2);
nghttp2_submit_ping(session, NGHTTP2_FLAG_NONE, NULL);
ud.block_count = 2;
@ -4546,7 +4546,7 @@ void test_nghttp2_session_data_backoff_by_high_pri_frame(void)
CU_ASSERT(0 == nghttp2_session_send(session));
CU_ASSERT(NGHTTP2_PING == ud.sent_frame_type);
/* data for DATA[2] is read from data_prd but it is not sent */
CU_ASSERT(ud.data_source_length == NGHTTP2_DATA_PAYLOAD_LENGTH);
CU_ASSERT(ud.data_source_length == NGHTTP2_DATA_PAYLOADLEN);
ud.block_count = 2;
/* Sends DATA[2..3] */