Code cleanup

This commit is contained in:
Tatsuhiro Tsujikawa 2014-05-10 00:13:40 +09:00
parent 3ebb3faf32
commit 4c8d4f8a85
1 changed files with 4 additions and 30 deletions

View File

@ -576,10 +576,9 @@ int nghttp2_session_add_frame(nghttp2_session *session,
switch(frame->hd.type) { switch(frame->hd.type) {
case NGHTTP2_HEADERS: case NGHTTP2_HEADERS:
case NGHTTP2_PUSH_PROMISE:
item->weight = NGHTTP2_MAX_WEIGHT; item->weight = NGHTTP2_MAX_WEIGHT;
break;
case NGHTTP2_PRIORITY:
break; break;
case NGHTTP2_RST_STREAM: case NGHTTP2_RST_STREAM:
if(stream) { if(stream) {
@ -591,27 +590,18 @@ int nghttp2_session_add_frame(nghttp2_session *session,
stream->state = NGHTTP2_STREAM_CLOSING; stream->state = NGHTTP2_STREAM_CLOSING;
} }
} }
break; break;
case NGHTTP2_SETTINGS: case NGHTTP2_SETTINGS:
item->weight = NGHTTP2_OB_SETTINGS_WEIGHT; item->weight = NGHTTP2_OB_SETTINGS_WEIGHT;
break;
case NGHTTP2_PUSH_PROMISE:
item->weight = NGHTTP2_MAX_WEIGHT;
break; break;
case NGHTTP2_PING: case NGHTTP2_PING:
/* Ping has highest priority. */ /* Ping has highest priority. */
item->weight = NGHTTP2_OB_PING_WEIGHT; item->weight = NGHTTP2_OB_PING_WEIGHT;
break; break;
case NGHTTP2_GOAWAY: default:
/* Should GOAWAY have higher priority? */
break;
case NGHTTP2_WINDOW_UPDATE:
break;
case NGHTTP2_ALTSVC:
break;
case NGHTTP2_BLOCKED:
break; break;
} }
@ -2113,26 +2103,10 @@ static int session_after_frame_sent(nghttp2_session *session)
return rv; return rv;
} }
break; break;
case NGHTTP2_SETTINGS:
/* nothing to do */
break;
case NGHTTP2_PUSH_PROMISE:
/* nothing to do */
break;
case NGHTTP2_PING:
/* nothing to do */
break;
case NGHTTP2_GOAWAY: case NGHTTP2_GOAWAY:
session->goaway_flags |= NGHTTP2_GOAWAY_SEND; session->goaway_flags |= NGHTTP2_GOAWAY_SEND;
break; break;
case NGHTTP2_WINDOW_UPDATE: default:
/* nothing to do */
break;
case NGHTTP2_ALTSVC:
/* nothing to do */
break;
case NGHTTP2_BLOCKED:
/* nothing to do */
break; break;
} }
active_outbound_item_reset(&session->aob); active_outbound_item_reset(&session->aob);