diff --git a/src/sock.c b/src/sock.c index d60db09..9970a4b 100644 --- a/src/sock.c +++ b/src/sock.c @@ -248,6 +248,9 @@ void patty_ax25_sock_init(patty_ax25_sock *sock) { * AX.25 v2.2, Section 6.5 "Resetting Procedure" */ void patty_ax25_sock_reset(patty_ax25_sock *sock) { + int i, + slots = tx_slots(sock); + sock->flow = PATTY_AX25_SOCK_READY; sock->vs = 0; sock->vr = 0; @@ -255,7 +258,14 @@ void patty_ax25_sock_reset(patty_ax25_sock *sock) { sock->retries = sock->n_retry; sock->rx_pending = 0; - patty_timer_clear(&sock->timer_t1); + for (i=0; ilen = 0; + slot->ack = 0; + } + + patty_timer_start(&sock->timer_t1); patty_timer_clear(&sock->timer_t2); patty_timer_clear(&sock->timer_t3); }