Assign nghttp2_frame.ext.payload early

This commit is contained in:
Tatsuhiro Tsujikawa 2016-04-06 21:56:01 +09:00
parent 31595c2416
commit df56f55f84
1 changed files with 1 additions and 2 deletions

View File

@ -4685,8 +4685,6 @@ static int session_process_altsvc_frame(nghttp2_session *session) {
nghttp2_inbound_frame *iframe = &session->iframe; nghttp2_inbound_frame *iframe = &session->iframe;
nghttp2_frame *frame = &iframe->frame; nghttp2_frame *frame = &iframe->frame;
frame->ext.payload = &iframe->ext_frame_payload.altsvc;
nghttp2_frame_unpack_altsvc_payload( nghttp2_frame_unpack_altsvc_payload(
&frame->ext, nghttp2_get_uint16(iframe->sbuf.pos), iframe->lbuf.pos, &frame->ext, nghttp2_get_uint16(iframe->sbuf.pos), iframe->lbuf.pos,
nghttp2_buf_len(&iframe->lbuf)); nghttp2_buf_len(&iframe->lbuf));
@ -5567,6 +5565,7 @@ ssize_t nghttp2_session_mem_recv(nghttp2_session *session, const uint8_t *in,
DEBUGF(fprintf(stderr, "recv: ALTSVC\n")); DEBUGF(fprintf(stderr, "recv: ALTSVC\n"));
iframe->frame.hd.flags = NGHTTP2_FLAG_NONE; iframe->frame.hd.flags = NGHTTP2_FLAG_NONE;
iframe->frame.ext.payload = &iframe->ext_frame_payload.altsvc;
if (iframe->payloadleft < 2) { if (iframe->payloadleft < 2) {
busy = 1; busy = 1;