unsigned char *last_char;
switch (wsi->state) {
+#ifdef LWS_USE_HTTP2
case WSI_STATE_HTTP2_AWAIT_CLIENT_PREFACE:
case WSI_STATE_HTTP2_ESTABLISHED_PRE_SETTINGS:
case WSI_STATE_HTTP2_ESTABLISHED:
goto bail;
}
break;
+#endif
http_new:
case WSI_STATE_HTTP:
wsi->hdr_parsing_completed = 0;
case LWS_WRITE_HTTP_HEADERS:
case LWS_WRITE_PONG:
case LWS_WRITE_PING:
+#ifdef LWS_USE_HTTP2
if (wsi->mode == LWS_CONNMODE_HTTP2_SERVING) {
n = LWS_HTTP2_FRAME_TYPE_DATA;
if (protocol == LWS_WRITE_HTTP_HEADERS)
n = LWS_HTTP2_FRAME_TYPE_HEADERS;
return lws_http2_frame_write(wsi, n, 0, wsi->u.http2.my_stream_id, len, buf);
}
+#endif
return lws_issue_raw(wsi, (unsigned char *)buf - pre,
len + pre + post);
default:
lwsl_info("***** %x signalling to close in POLLOUT handler\n", wsi);
return -1; /* retry closing now */
}
-
+#ifdef LWS_USE_HTTP2
/* protocol packets are next */
if (wsi->pps) {
- lwsl_err("servicing pps %d\n", wsi->pps);
+ lwsl_info("servicing pps %d\n", wsi->pps);
switch (wsi->pps) {
case LWS_PPS_HTTP2_MY_SETTINGS:
case LWS_PPS_HTTP2_ACK_SETTINGS:
return 0; /* leave POLLOUT active */
}
-
+#endif
/* pending control packets have next priority */
if (wsi->state == WSI_STATE_ESTABLISHED && wsi->u.ws.ping_payload_len) {