Move queue_next_elem() outside of the switch block (fix #52)

This commit is contained in:
Victor Antonovich 2019-07-08 13:24:45 +04:00
parent b2effb1db9
commit c582e6f052

View File

@ -857,7 +857,6 @@ conn_loop(void)
conn_tty_start(&tty, curconn); conn_tty_start(&tty, curconn);
} }
} }
curconn = queue_next_elem(&queue, curconn);
break; break;
case CONN_RESP: case CONN_RESP:
if (FD_ISSET(curconn->sd, &sdsetwr)) if (FD_ISSET(curconn->sd, &sdsetwr))
@ -875,9 +874,9 @@ conn_loop(void)
if (curconn->ctr == (MB_FRAME(curconn->buf, MB_LENGTH_L) + HDRSIZE)) if (curconn->ctr == (MB_FRAME(curconn->buf, MB_LENGTH_L) + HDRSIZE))
state_conn_set(curconn, CONN_HEADER); state_conn_set(curconn, CONN_HEADER);
} }
curconn = queue_next_elem(&queue, curconn);
break; break;
} /* switch (curconn->state) */ } /* switch (curconn->state) */
curconn = queue_next_elem(&queue, curconn);
} /* while (len--) */ } /* while (len--) */
} /* while (TRUE) */ } /* while (TRUE) */