From ad826efa7b32e34c4471515a9ec4fe18ba05adfc Mon Sep 17 00:00:00 2001
From: Ken Bannister <kb2ma@runbox.com>
Date: Tue, 11 Sep 2018 05:02:28 -0400
Subject: [PATCH] nanocoap/example: fix resource order

---
 examples/nanocoap_server/coap_handler.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/examples/nanocoap_server/coap_handler.c b/examples/nanocoap_server/coap_handler.c
index 9a254ac2da..c8457beaf0 100644
--- a/examples/nanocoap_server/coap_handler.c
+++ b/examples/nanocoap_server/coap_handler.c
@@ -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]);
-- 
GitLab