mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +01:00
gcoap: accept resources in any order
This commit is contained in:
parent
2039a10e71
commit
da1f161c3c
@ -750,8 +750,7 @@ typedef struct {
|
||||
* @brief A modular collection of resources for a server
|
||||
*/
|
||||
struct gcoap_listener {
|
||||
const coap_resource_t *resources; /**< First element in the array of
|
||||
* resources; must order alphabetically */
|
||||
const coap_resource_t *resources; /**< First element in the array of resources */
|
||||
size_t resources_len; /**< Length of array */
|
||||
/**
|
||||
* @brief Transport type for the listener
|
||||
|
@ -744,13 +744,9 @@ static int _request_matcher_default(gcoap_listener_t *listener,
|
||||
int res = coap_match_path(*resource, uri);
|
||||
|
||||
/* URI mismatch */
|
||||
if (res > 0) {
|
||||
if (res != 0) {
|
||||
continue;
|
||||
}
|
||||
/* resources expected in alphabetical order */
|
||||
else if (res < 0) {
|
||||
break;
|
||||
}
|
||||
|
||||
/* potential match, check for method */
|
||||
if (! ((*resource)->methods & method_flag)) {
|
||||
|
Loading…
Reference in New Issue
Block a user