Commit 5aa487c5 authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

nghttp2_stream: flags is now nghttp2_stream_flags

We use this flag to know whether it is pushed or not
parent 45837a2c
......@@ -1150,7 +1150,7 @@ static ssize_t nghttp2_session_prep_frame(nghttp2_session *session,
aux_data = (nghttp2_headers_aux_data*)item->aux_data;
if(nghttp2_session_open_stream
(session, frame->hd.stream_id,
frame->hd.flags,
NGHTTP2_STREAM_FLAG_NONE,
frame->headers.pri,
NGHTTP2_STREAM_INITIAL,
aux_data ? aux_data->stream_user_data : NULL) == NULL) {
......@@ -1232,7 +1232,7 @@ static ssize_t nghttp2_session_prep_frame(nghttp2_session *session,
assert(stream);
if(nghttp2_session_open_stream
(session, frame->push_promise.promised_stream_id,
frame->hd.flags,
NGHTTP2_STREAM_FLAG_PUSH,
nghttp2_pushed_stream_pri(stream),
NGHTTP2_STREAM_RESERVED,
NULL) == NULL) {
......@@ -1941,7 +1941,7 @@ int nghttp2_session_on_request_headers_received(nghttp2_session *session,
stream = nghttp2_session_open_stream(session,
frame->hd.stream_id,
frame->hd.flags,
NGHTTP2_STREAM_FLAG_NONE,
frame->headers.pri,
NGHTTP2_STREAM_OPENING,
NULL);
......@@ -2628,7 +2628,7 @@ int nghttp2_session_on_push_promise_received(nghttp2_session *session,
promised_stream = nghttp2_session_open_stream
(session,
frame->push_promise.promised_stream_id,
frame->hd.flags,
NGHTTP2_STREAM_FLAG_PUSH,
nghttp2_pushed_stream_pri(stream),
NGHTTP2_STREAM_RESERVED,
NULL);
......@@ -3788,7 +3788,7 @@ int nghttp2_session_upgrade(nghttp2_session *session,
if(rv != 0) {
return rv;
}
stream = nghttp2_session_open_stream(session, 1, NGHTTP2_FLAG_END_STREAM,
stream = nghttp2_session_open_stream(session, 1, NGHTTP2_STREAM_FLAG_NONE,
0, NGHTTP2_STREAM_OPENING,
session->server ?
NULL : stream_user_data);
......
......@@ -72,6 +72,12 @@ typedef enum {
NGHTTP2_SHUT_RDWR = NGHTTP2_SHUT_RD | NGHTTP2_SHUT_WR
} nghttp2_shut_flag;
typedef enum {
NGHTTP2_STREAM_FLAG_NONE = 0,
/* Indicates that this stream is pushed stream */
NGHTTP2_STREAM_FLAG_PUSH = 0x01
} nghttp2_stream_flag;
typedef enum {
NGHTTP2_DEFERRED_NONE = 0,
/* Indicates the DATA is deferred due to flow control. */
......@@ -104,7 +110,7 @@ typedef struct {
submitting WINDOW_UPDATE. See nghttp2_submit_window_update(). */
int32_t local_window_size;
nghttp2_stream_state state;
/* Use same value in SYN_STREAM frame */
/* This is bitwise-OR of 0 or more of nghttp2_stream_flag. */
uint8_t flags;
/* Bitwise OR of zero or more nghttp2_shut_flag values */
uint8_t shut_flags;
......
This diff is collapsed.
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