diff --git a/impl/src/layer2/digipeater.c b/impl/src/layer2/digipeater.c index a5fca97..1635dd2 100644 --- a/impl/src/layer2/digipeater.c +++ b/impl/src/layer2/digipeater.c @@ -289,6 +289,10 @@ size_t digipeater_encode_next_packet(digipeater_ctx_t *ctx, uint8_t *buf, size_t if(connection_can_transmit(conn)) { packet_size = connection_encode_next_packet(conn, buf, buf_len, end_burst); + if(*end_burst) { + connection_tx_clean_empty_packet(conn); + } + ctx->state = DIGIPEATER_STATE_CONN; } } diff --git a/impl/test/layer2_over_udp/l2udptest_digipeater.c b/impl/test/layer2_over_udp/l2udptest_digipeater.c index 9ba8d02..9928c85 100644 --- a/impl/test/layer2_over_udp/l2udptest_digipeater.c +++ b/impl/test/layer2_over_udp/l2udptest_digipeater.c @@ -248,9 +248,6 @@ int main(int argc, char **argv) } } - // FIXME: where to put this in the digipeater? - //connection_tx_clean_empty_packet(&l2conn); - LOG(LVL_DEBUG, "Burst finished: %zd packets sent.", burst_len); }