static enum fsm_result recv_fsm(struct tcp_pcb *pcb, struct rfb_state *state) {
int i;
int pktsize;
-
+/*
outputf("RFB FSM: st %d rp %d wp %d", state->state, state->readpos,
state->writepos);
-
+*/
switch(state->state) {
case ST_BEGIN:
if (state->writepos < 12) return NEEDMORE;
}
copylen = pbuf_copy_partial(p, state->data + state->writepos, p->tot_len, 0);
+/*
outputf("RFB: Processing %d, wp %d, cp %d", p->tot_len, state->writepos, copylen);
+*/
state->writepos += p->tot_len;
tcp_recved(pcb, p->tot_len);