mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-26 00:41:42 +03:00
Add sorting of optlist
This commit is contained in:
1 parent
d2b61c2e49
commit
f79eaba9b9
6 files changed
+39
-2
No files matched your search
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user