Files
libcoap/include
Jon Shallow 23a6daf1e5 Fix timing window in epoll logic
It is possible to miss a packet retransmission if it is just about to happen
and the coap_run_once() logic takes the time past the packet retransmission.
The retransmission will take place when coap_run_once() is next run, but that
could be significantly later.

1) Create a new coap_io_prepare_epoll() function that calls coap_write(), but
sets the etimer within this function instead of at the end of coap_run_once().

2) Handle the etimer trigger within coap_io_do_events() rather than loop
checking coap_io_do_events() within coap_run_once().

include/coap2/net.h:

Define coap_io_prepare_epoll().
Update coap_io_do_events() to be type void.

src/coap_io.c:

Add in coap_io_prepare_epoll().
Update coap_run_once() to use new/updated functions.

src/net.c:

Update coap_io_do_events().
Make coap_new_context() always fail if there is an epoll logic setup failure
libcoap compiled for epoll will not continue to run.
Give a runtime warning if coap_read() or coap_io_do_events() are called when
libcoap is compiled or not compiled respectively for using epoll.
[Both coap_read() and coap_io_do_events() need to be in libcoap-2.{map|sym} to
support when compiling with or without epoll support]

libcoap-2.map:
libcoap-2.sym:

Make coap_io_prepare_epoll() application accessible.
2019-09-13 21:08:04 +01:00
..
2019-09-13 21:08:04 +01:00