1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2026-01-01 01:41:18 +01:00

net/gcoap: make use of coap_opt_add_path()

This commit is contained in:
Benjamin Valentin 2020-04-03 15:49:29 +02:00
parent 1a4a5d4a9e
commit c8b2483de5

View File

@ -659,7 +659,7 @@ int gcoap_req_init(coap_pkt_t *pdu, uint8_t *buf, size_t len,
coap_pkt_init(pdu, buf, len - CONFIG_GCOAP_REQ_OPTIONS_BUF, res);
if (path != NULL) {
res = coap_opt_add_string(pdu, COAP_OPT_URI_PATH, path, '/');
res = coap_opt_add_uri_path(pdu, path);
}
return (res > 0) ? 0 : res;
}