return 0;
}
if (wsi->u.ws.rx_draining_ext) {
- m = lws_rx_sm(wsi, 0);
+#if !defined(LWS_NO_CLIENT)
+ if (wsi->mode == LWSCM_WS_CLIENT)
+ m = lws_client_rx_sm(wsi, 0);
+ else
+#endif
+ m = lws_rx_sm(wsi, 0);
if (m < 0)
return -1;
continue;
/* we don't support chained client connections yet */
return 1;
-
+#if 0
/* otherwise set ourselves up ready to go again */
wsi->state = LWSS_CLIENT_HTTP_ESTABLISHED;
wsi->mode = LWSCM_HTTP_CLIENT_ACCEPTED;
* we can drop the ah, if any
*/
if (wsi->u.hdr.ah) {
- wsi->u.hdr.ah->rxpos = wsi->u.hdr.ah->rxlen;
+ lws_header_table_force_to_detachable_state(wsi);
lws_header_table_detach(wsi, 0);
}
lwsl_info("%s: %p: keep-alive await new transaction\n", __func__, wsi);
return 0;
+#endif
}
LWS_VISIBLE LWS_EXTERN unsigned int
if (lws_hdr_total_length(wsi, WSI_TOKEN_HTTP_CONTENT_LENGTH)) {
wsi->u.http.content_length =
- atoi(lws_hdr_simple_ptr(wsi,
+ atoll(lws_hdr_simple_ptr(wsi,
WSI_TOKEN_HTTP_CONTENT_LENGTH));
lwsl_notice("%s: incoming content length %llu\n", __func__,
(unsigned long long)wsi->u.http.content_length);
wsi->user_space, NULL, 0))
return NULL;
- wsi->u.hdr.ah->rxpos = wsi->u.hdr.ah->rxlen;
+ lws_header_table_force_to_detachable_state(wsi);
lws_union_transition(wsi, LWSCM_RAW);
lws_header_table_detach(wsi, 1);