Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nghttp2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
nghttp2
Commits
2685e340
Commit
2685e340
authored
Apr 02, 2014
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename NGHTTP2_DATA_PAYLOAD_LENGTH as NGHTTP2_DATA_PAYLOADLEN
parent
9c4c99bf
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
13 deletions
+13
-13
lib/nghttp2_frame.h
lib/nghttp2_frame.h
+1
-1
lib/nghttp2_session.c
lib/nghttp2_session.c
+1
-1
tests/nghttp2_session_test.c
tests/nghttp2_session_test.c
+11
-11
No files found.
lib/nghttp2_frame.h
View file @
2685e340
...
...
@@ -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_PAYLOAD
LEN
4096
/* The number of bytes for each SETTINGS entry */
#define NGHTTP2_FRAME_SETTINGS_ENTRY_LENGTH 5
...
...
lib/nghttp2_session.c
View file @
2685e340
...
...
@@ -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_PAYLOAD
LEN
;
DEBUGF
(
fprintf
(
stderr
,
"send: remote windowsize connection=%d, "
...
...
tests/nghttp2_session_test.c
View file @
2685e340
...
...
@@ -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_PAYLOAD
LEN
*
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_PAYLOAD
LEN
*
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_PAYLOAD
LEN
*
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_PAYLOAD
LEN
*
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_PAYLOAD
LEN
*
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_PAYLOAD
LEN
*
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_PAYLOAD
LEN
*
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_PAYLOAD
LEN
*
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_PAYLOAD
LEN
*
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_PAYLOAD
LEN
*
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_PAYLOAD
LEN
);
ud
.
block_count
=
2
;
/* Sends DATA[2..3] */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment