Browse Source

1

nodeinfo-routing-update
jeka 4 weeks ago
parent
commit
40c63f60ef
  1. 10
      src/pkt_normalizer.c

10
src/pkt_normalizer.c

@ -101,7 +101,7 @@ void pn_deinit(struct PKTNORM* pn) {
}
if (pn->flush_timer) {
uasync_cancel_timeout(pn->ua, pn->flush_timer);
uasync_call_soon_cancel(pn->ua, pn->flush_timer);
}
if (pn->data) {
@ -146,7 +146,7 @@ void pn_reset(struct PKTNORM* pn) {
// Cancel flush timer
if (pn->flush_timer) {
uasync_cancel_timeout(pn->ua, pn->flush_timer);
uasync_call_soon_cancel(pn->ua, pn->flush_timer);
pn->flush_timer = NULL;
}
@ -199,7 +199,7 @@ void pn_packer_send(struct PKTNORM* pn, uint8_t* data, uint16_t len) {
// Cancel flush timer if active
if (pn->flush_timer) {
uasync_cancel_timeout(pn->ua, pn->flush_timer);
uasync_call_soon_cancel(pn->ua, pn->flush_timer);
pn->flush_timer = NULL;
}
@ -313,13 +313,13 @@ exit:
// Cancel flush timer if active
if (pn->flush_timer) {
uasync_cancel_timeout(pn->ua, pn->flush_timer);
uasync_call_soon_cancel(pn->ua, pn->flush_timer);
pn->flush_timer = NULL;
}
// Set flush timer if no more input
if (queue_entry_count(pn->input) == 0) {
pn->flush_timer = uasync_set_timeout(pn->ua, pn->tx_wait_time, pn, pn_flush_cb);
pn->flush_timer = uasync_call_soon(pn->ua/*, pn->tx_wait_time*/, pn, pn_flush_cb);
}
queue_resume_callback(pn->input);

Loading…
Cancel
Save