Don't access nc->ssl if SSL is disabled

PUBLISHED_FROM=bdbd9416f73f84a3d8afbffe886d0922c36769d4
This commit is contained in:
Dmitry Frank 2016-10-17 13:02:00 +03:00 committed by Cesanta Bot
parent 4216cf2ac1
commit 4656e7b0dd

View File

@ -11691,9 +11691,13 @@ void mg_if_recved(struct mg_connection *nc, size_t len) {
DBG(("%p %p %u", nc, cs->pcb.tcp, len));
/* Currently SSL acknowledges data immediately.
* TODO(rojer): Find a way to propagate mg_if_recved. */
#if MG_ENABLE_SSL
if (nc->ssl == NULL) {
tcp_recved(cs->pcb.tcp, len);
}
#else
tcp_recved(cs->pcb.tcp, len);
#endif
mbuf_trim(&nc->recv_mbuf);
}