- err = tcp_write(pcb, mbuf, sndlength, TCP_WRITE_FLAG_COPY /* This is my memory on the stack, thank you very much. */);
- if (err == ERR_MEM) {
- outputf("RFB: ERR_MEM sending %d", sndlength);
+ err = tcp_write(pcb, fb->fbaddr + state->update_pos, sndlength, TCP_WRITE_FLAG_COPY /* The card can't DMA from there. */);
+ if (err == ERR_MEM) /* Back down until lwip says we've got space. */