diff --git a/mesh/net.c b/mesh/net.c
index 439316e..17dbf2e 100644
--- a/mesh/net.c
+++ b/mesh/net.c
l_info("RX: App 0x%04x -> 0x%04x : TTL 0x%02x : SEQ 0x%06x",
net_src, net_dst, net_ttl, net_seq);
- l_debug("seq:%x seq0:%x", net_seq, net_seqZero);
if (net_ctl) {
l_debug("CTL - %4.4x RX", net_seqZero);
if (net_opcode == NET_OP_SEG_ACKNOWLEDGE) {
diff --git a/mesh/pb-adv.c b/mesh/pb-adv.c
index 586cd7f..27cbc46 100644
--- a/mesh/pb-adv.c
+++ b/mesh/pb-adv.c
uint8_t type;
bool first;
- if (!session || pb_session != session)
+ if (!pb_session || pb_session != session)
return;
link_id = l_get_be32(pkt + 1);
return;
}
+ send_ack(session, session->peer_trans_num);
+
if (session->last_peer_trans_num != session->peer_trans_num) {
session->got_segs = 0;
+ session->last_peer_trans_num = session->peer_trans_num;
session->rx_cb(session->user_data, session->sar,
session->exp_len);
}
-
- session->last_peer_trans_num = session->peer_trans_num;
- send_ack(session, session->last_peer_trans_num);
}
}