nanocoap/example: fix resource order

This commit is contained in:
Ken Bannister 2018-09-11 05:02:28 -04:00
parent 6265da2894
commit ad826efa7b

View File

@ -104,12 +104,12 @@ ssize_t _sha256_handler(coap_pkt_t* pkt, uint8_t *buf, size_t len, void *context
return pkt_pos - (uint8_t*)pkt->hdr;
}
/* must be sorted by path (alphabetically) */
/* must be sorted by path (ASCII order) */
const coap_resource_t coap_resources[] = {
COAP_WELL_KNOWN_CORE_DEFAULT_HANDLER,
{ "/sha256", COAP_POST, _sha256_handler, NULL },
{ "/riot/board", COAP_GET, _riot_board_handler, NULL },
{ "/riot/value", COAP_GET | COAP_PUT | COAP_POST, _riot_value_handler, NULL },
{ "/sha256", COAP_POST, _sha256_handler, NULL },
};
const unsigned coap_resources_numof = sizeof(coap_resources) / sizeof(coap_resources[0]);