Correctly report bytes sent via SSL

This prevented hexdump from showing data sent over SSL when using LWIP net_if

PUBLISHED_FROM=aa520a27bdd21294484c52bf33c8580f3b4bad65
This commit is contained in:
Deomid Ryabkov 2017-05-11 10:49:36 +01:00 committed by Cesanta Bot
parent 6f140202ad
commit acfc66cd60

View File

@ -15099,6 +15099,7 @@ void mg_lwip_ssl_send(struct mg_connection *nc) {
int ret = mg_ssl_if_write(nc, nc->send_mbuf.buf, len); int ret = mg_ssl_if_write(nc, nc->send_mbuf.buf, len);
DBG(("%p SSL_write %u = %d, %d", nc, len, ret)); DBG(("%p SSL_write %u = %d, %d", nc, len, ret));
if (ret > 0) { if (ret > 0) {
mg_if_sent_cb(nc, ret);
mbuf_remove(&nc->send_mbuf, ret); mbuf_remove(&nc->send_mbuf, ret);
mbuf_trim(&nc->send_mbuf); mbuf_trim(&nc->send_mbuf);
cs->last_ssl_write_size = 0; cs->last_ssl_write_size = 0;