mirror of
https://github.com/cesanta/mongoose.git
synced 2026-12-04 21:58:22 +00:00
Don't access nc->ssl if SSL is disabled
PUBLISHED_FROM=bdbd9416f73f84a3d8afbffe886d0922c36769d4
This commit is contained in:
1 parent
4216cf2ac1
commit
4656e7b0dd
1 file changed
+4
@@ -11691,9 +11691,13 @@ void mg_if_recved(struct mg_connection *nc, size_t len) {
|
|||||||
DBG(("%p %p %u", nc, cs->pcb.tcp, len));
|
DBG(("%p %p %u", nc, cs->pcb.tcp, len));
|
||||||
/* Currently SSL acknowledges data immediately.
|
/* Currently SSL acknowledges data immediately.
|
||||||
* TODO(rojer): Find a way to propagate mg_if_recved. */
|
* TODO(rojer): Find a way to propagate mg_if_recved. */
|
||||||
|
#if MG_ENABLE_SSL
|
||||||
if (nc->ssl == NULL) {
|
if (nc->ssl == NULL) {
|
||||||
tcp_recved(cs->pcb.tcp, len);
|
tcp_recved(cs->pcb.tcp, len);
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
tcp_recved(cs->pcb.tcp, len);
|
||||||
|
#endif
|
||||||
mbuf_trim(&nc->recv_mbuf);
|
mbuf_trim(&nc->recv_mbuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user