Stop flow before sending last I frame in window

Stop flow before sending last I frame in window; furthermore, this last
I frame will have the P/F flag set to 1, to implicitly request a RR, RNR
or REJ response as appropriate
This commit is contained in:
XANTRONIX 2020-08-23 00:39:39 -05:00 committed by XANTRONIX Industrial
parent 826653f0d9
commit ec9066167b

View file

@ -2204,22 +2204,17 @@ static int handle_sock(uint32_t key,
return 0; return 0;
} }
if (sock->flow == PATTY_AX25_SOCK_WAIT) {
sock->flow = PATTY_AX25_SOCK_READY;
}
/* /*
* AX.25 v2.2, Section 6.4.1 "Sending I Frames" * AX.25 v2.2, Section 6.4.1 "Sending I Frames"
*/ */
if (sock->flow == PATTY_AX25_SOCK_WAIT) { if (patty_ax25_sock_flow_left(sock) == 1) {
sock->flow = PATTY_AX25_SOCK_READY;
} else if (patty_ax25_sock_flow_full(sock)) {
int ret;
sock_flow_stop(server, sock); sock_flow_stop(server, sock);
ret = patty_ax25_sock_send_rr(sock, PATTY_AX25_FRAME_COMMAND, 1);
patty_timer_stop(&sock->timer_t3); patty_timer_stop(&sock->timer_t3);
patty_timer_start(&sock->timer_t1);
return ret;
} }
/* /*