Skip to content

nanocoap: add coap_opt_add_uri_path_with_len()#15697

Closed
benpicco wants to merge 1 commit intoRIOT-OS:masterfrom
benpicco:nanocoap/coap_opt_add_uri_path_with_len
Closed

nanocoap: add coap_opt_add_uri_path_with_len()#15697
benpicco wants to merge 1 commit intoRIOT-OS:masterfrom
benpicco:nanocoap/coap_opt_add_uri_path_with_len

Conversation

@benpicco
Copy link
Copy Markdown
Contributor

Contribution description

It can often be handy to append a non-0 terminated string to a path, e.g. because only a substring should be added or the result of a function that doesn't NULL-terminate strings (base64url_encode(), strncpy()).

Add a helper function for that case, that acts just as coap_opt_add_uri_path() but allows to specify a length.

Testing procedure

Issues/PRs references

@benpicco benpicco requested review from bergzand and chrysn December 24, 2020 00:52
@benpicco benpicco added Area: CoAP Area: Constrained Application Protocol implementations Impact: minor The PR is small in size and might only require a quick look of a knowledgeable reviewer Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation labels Dec 24, 2020
@benpicco benpicco force-pushed the nanocoap/coap_opt_add_uri_path_with_len branch from 2277a4c to ec6f54b Compare December 24, 2020 00:52
@benpicco benpicco changed the title nanocoap: add qcoap_opt_add_uri_path_with_len() nanocoap: add coap_opt_add_uri_path_with_len() Dec 24, 2020
@benpicco benpicco requested review from kaspar030 and kb2ma January 12, 2021 14:37
It can often be handy to append a non-0 terminated string to a path,
e.g. because only a substring should be added or the result of a
function that doesn't NULL-terminate strings (base64url_encode(), strncpy()).

Add a helper function for that case, that acts just as coap_opt_add_uri_path()
but allows to specify a length.
@benpicco benpicco force-pushed the nanocoap/coap_opt_add_uri_path_with_len branch from ec6f54b to 597263d Compare January 25, 2021 13:25
@benpicco benpicco added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Jan 25, 2021
@benpicco benpicco requested review from jia200x and removed request for jia200x February 1, 2021 17:49
@MrKevinWeiss MrKevinWeiss added this to the Release 2021.07 milestone Jun 21, 2021
@MrKevinWeiss MrKevinWeiss removed this from the Release 2021.07 milestone Jul 15, 2021
@benpicco
Copy link
Copy Markdown
Contributor Author

benpicco commented Aug 5, 2021

same as #16712

@benpicco benpicco closed this Aug 5, 2021
@benpicco benpicco deleted the nanocoap/coap_opt_add_uri_path_with_len branch August 5, 2021 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: CoAP Area: Constrained Application Protocol implementations CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Impact: minor The PR is small in size and might only require a quick look of a knowledgeable reviewer Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants