Fix print chunk

This commit is contained in:
Scott Shawcroft 2022-07-26 11:51:10 -07:00
parent f4927dd2d6
commit f9cc4ec61b
No known key found for this signature in database
GPG Key ID: 0DFD512649C052DA

View File

@ -335,7 +335,7 @@ static void _send_chunk(socketpool_socket_obj_t *socket, const char *chunk) {
} }
STATIC void _print_chunk(void *env, const char *str, size_t len) { STATIC void _print_chunk(void *env, const char *str, size_t len) {
mp_print_t _socket_print = {socket, _print_raw}; mp_print_t _socket_print = {env, _print_raw};
mp_printf(&_socket_print, "%X\r\n", len); mp_printf(&_socket_print, "%X\r\n", len);
_send_raw((socketpool_socket_obj_t *)env, (const uint8_t *)str, len); _send_raw((socketpool_socket_obj_t *)env, (const uint8_t *)str, len);
_send_raw((socketpool_socket_obj_t *)env, (const uint8_t *)"\r\n", 2); _send_raw((socketpool_socket_obj_t *)env, (const uint8_t *)"\r\n", 2);