mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-05 09:22:54 +03:00
coap_add_optlist_pdu() sorted the options for insertion, but did not update the coap_optlist_t head (whch may then no longer point to the first entry in the sorted chain) and so when coap_delete_optlist() was called, the first few entries of the sorted chain may not get deleted. Fixed by making it coap_add_optlist_pdu(coap_pdu_t *pdu, coap_optlist_t** optlist_chain) instead of coap_add_optlist_pdu(coap_pdu_t *pdu, coap_optlist_t* optlist_chain) Additionally deleted options_start() and options_next() as they are not required - Issue #184. examples/client.c: Fix coap_add_optlist_pdu() call include/coap/options.h: Fix coap_add_optlist_pdu() call libcoap-2.{map|sym}: Delete options_start() man/coap_observe.txt.in: man/coap_pdu_setup.txt.in: Update docmentation src/option.c: Update coap_add_optlist_pdu() tests/test_pdu.c: New tests for checkout out coap_insert_optlist() and coap_add_optlist_pdu() functions