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

Ken Bannister notifications at github.com
Tue Mar 5 19:32:05 CET 2019

kb2ma 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;

I've compared the resource lookup functions in gcoap and nanocoap. On second thought, I don't think it's worth expanding the API to create a public function just to compare the request path to the resource path. If we do such a thing, I would be in favor of a second header file, something like `nanocoap_private.h`, or at least including a clear warning that this function isn't really useful for an application user. I'm also OK with leaving the code as is.

On the other hand, I do think it's useful to expand the API for a function that loops through an entire array of resources to look for a match, but I think that function is out of scope for this PR.

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/20190305/d39972a7/attachment.html>

More information about the notifications mailing list