Add sorting of optlist

This commit is contained in:
Magdalena Szumny authored and Jon Shallow committed 2026-02-16 10:34:48 +00:00
1 parent d2b61c2e49
commit f79eaba9b9
6 files changed
+39 -2

No files matched your search

+10
View File
@@ -567,6 +567,16 @@ coap_add_optlist_pdu(coap_pdu_t *pdu, coap_optlist_t **options) {
return 1;
}
int
coap_sort_optlist(coap_optlist_t **options) {
if (options && *options) {
/* sort options for delta encoding */
LL_SORT((*options), order_opts);
return 1;
}
return 0;
}
int
coap_insert_optlist(coap_optlist_t **head, coap_optlist_t *node) {
if (!node) {