1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

suit/transport/coap: Use generic subtree handler

The SUIT CoAP code can make use of the generic subtree handler. This
commit removes the obsolete code to make use of the more generic
nanocoap subtree handlers.
This commit is contained in:
Koen Zandberg 2020-03-24 15:07:09 +01:00 committed by Benjamin Valentin
parent eecac6945b
commit 677871d717
2 changed files with 0 additions and 31 deletions

View File

@ -67,29 +67,6 @@ void suit_coap_run(void);
*/
#ifndef DOXYGEN
/**
* @brief Coap subtree handler
*
* @param[in,out] pkt Packet struct containing the request. Is reused for
* the response
* @param[in] buf Buffer to write reply to
* @param[in] len Total length of the buffer associated with the
* request
* @param[in] buf Buffer to write reply to
*
* @returns ssize_t Size of the reply
*/
ssize_t coap_subtree_handler(coap_pkt_t *pkt, uint8_t *buf,
size_t len, void *context);
/**
* @brief Type for CoAP resource subtrees
*/
typedef const struct {
const coap_resource_t *resources; /**< ptr to resource array */
const size_t resources_numof; /**< nr of entries in array */
} coap_resource_subtree_t;
/**
* @brief Reference to the coap resource subtree
*/

View File

@ -104,14 +104,6 @@ static inline void _print_download_progress(suit_manifest_t *manifest,
static kernel_pid_t _suit_coap_pid;
ssize_t coap_subtree_handler(coap_pkt_t *pkt, uint8_t *buf, size_t len,
void *context)
{
coap_resource_subtree_t *subtree = context;
return coap_tree_handler(pkt, buf, len, subtree->resources,
subtree->resources_numof);
}
static void _suit_handle_url(const char *url, coap_blksize_t blksize)
{
LOG_INFO("suit_coap: downloading \"%s\"\n", url);