1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
19553: nanocoap_sock: remove nanocoap_get() r=maribu a=benpicco



Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
This commit is contained in:
bors[bot] 2023-05-15 20:47:28 +00:00 committed by GitHub
commit bbe952cb8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 35 deletions

View File

@ -65,8 +65,8 @@
*
* Follow the instructions in the section _Write Options and Payload_ below.
*
* To send the message and await the response, see nanocoap_request() as well
* as nanocoap_get(), which additionally copies the response payload to a user
* To send the message and await the response, see nanocoap_sock_request() as well
* as nanocoap_sock_get(), which additionally copies the response payload to a user
* supplied buffer. Finally, read the response as described above in the server
* _Handler functions_ section for reading a request.
*
@ -565,23 +565,6 @@ ssize_t nanocoap_sock_request_cb(nanocoap_sock_t *sock, coap_pkt_t *pkt,
ssize_t nanocoap_request(coap_pkt_t *pkt, const sock_udp_ep_t *local,
const sock_udp_ep_t *remote, size_t len);
/**
* @brief Simple synchronous CoAP (confirmable) get
*
* @deprecated Will be removed after the 2023.04 release.
* Please use @ref nanocoap_sock_get instead.
*
* @param[in] remote remote UDP endpoint
* @param[in] path remote path
* @param[out] buf buffer to write response to
* @param[in] len length of @p buffer
*
* @returns length of response payload on success
* @returns <0 on error
*/
ssize_t nanocoap_get(const sock_udp_ep_t *remote, const char *path,
void *buf, size_t len);
/**
* @brief Initialize block request context by URL and connect a socket
*

View File

@ -548,22 +548,6 @@ ssize_t nanocoap_request(coap_pkt_t *pkt, const sock_udp_ep_t *local,
return res;
}
ssize_t nanocoap_get(const sock_udp_ep_t *remote, const char *path, void *buf, size_t len)
{
int res;
nanocoap_sock_t sock;
res = nanocoap_sock_connect(&sock, NULL, remote);
if (res) {
return res;
}
res = nanocoap_sock_get(&sock, path, buf, len);
nanocoap_sock_close(&sock);
return res;
}
static int _block_cb(void *arg, coap_pkt_t *pkt)
{
_block_ctx_t *ctx = arg;