[riot-notifications] [RIOT-OS/RIOT] sys/net/application_layer/nanocoap: Add path prefix option (#11098)
notifications at github.com
Mon Mar 4 22:08:52 CET 2019
kaspar030 commented on this pull request.
> @@ -323,7 +323,15 @@ ssize_t coap_handle_req(coap_pkt_t *pkt, uint8_t *resp_buf, unsigned resp_buf_le
- int res = strcmp((char *)uri, resource->path);
+ int res;
Maybe at that point a custom strcmp would make sense. It could do strncmp, but if it arrives at the end of resource->path, if up to that point the strings matched and the current path position is '/', it considers that as a match.
Unless there is a use cases for prefixes that are not a whole subtree, that would remove the need for the method flag altogether.
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...
More information about the notifications