[riot-notifications] [RIOT-OS/RIOT] sys/net/application_layer/nanocoap: Add path prefix option (#11098)

Kaspar Schleiser notifications at github.com
Mon Mar 4 16:27:22 CET 2019

kaspar030 requested changes on this pull request.

Good idea in general. I thought we'd implemented this already. :)

Please remove the added extra field and re-use the methods field.
Also, please undo all the reformatting, it makes reviewing the actual change much easier.

(now I'm realizing why you did that: without the field names, adding a field breaks old code...)

> @@ -265,6 +286,7 @@ typedef ssize_t (*coap_handler_t)(coap_pkt_t *pkt, uint8_t *buf, size_t len, voi
 typedef struct {
     const char *path;               /**< URI path of resource               */
+    unsigned path_opt;              /**< URI path options                   */

We should use a free bit of the methods field. For the example alone, this wastes 20 bytes RAM otherwise, on ARM.

I suggest calling it COAP_MATCH_SUBTREE or something similar.

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190304/c35bd038/attachment.html>

More information about the notifications mailing list