can_write() honors link state

This commit is contained in:
cpq committed 2026-11-26 11:50:49 +00:00
1 parent dc91248aca
commit b30acaaabb
3 files changed
+12 -6

No files matched your search

+2
View File
@@ -1280,6 +1280,8 @@ static void test_frag_send_path(void) {
mif.driver = &driver;
mif.driver_data = &s_driver_data;
mg_tcpip_init(&mgr, &mif);
mif.ip = mg_htonl(0xa00001);
mif.state = MG_TCPIP_STATE_READY; // so can_write() lets the data out
mif.mtu = 500; // force ad hoc small MTU to fragment IP
mg_http_listen(&mgr, "http://0.0.0.0:80", frag_send_fn, NULL);
mgr.conns->pfn = NULL;