net: coap: add coap_pendings_clear and coap_replies_clear
Clears whole stack of pendins and replies. Signed-off-by: Kiril Petrov <retfie@gmail.com>
This commit is contained in:
parent
d4f1f2a07e
commit
7305e7b4a2
2 changed files with 37 additions and 0 deletions
|
@ -768,6 +768,15 @@ bool coap_pending_cycle(struct coap_pending *pending);
|
|||
*/
|
||||
void coap_pending_clear(struct coap_pending *pending);
|
||||
|
||||
/**
|
||||
* @brief Cancels all pending retransmissions, so they become
|
||||
* available again.
|
||||
*
|
||||
* @param pendings Pointer to the array of #coap_pending structures
|
||||
* @param len Size of the array of #coap_pending structures
|
||||
*/
|
||||
void coap_pendings_clear(struct coap_pending *pendings, size_t len);
|
||||
|
||||
/**
|
||||
* @brief Cancels awaiting for this reply, so it becomes available
|
||||
* again. User responsibility to free the memory associated with data.
|
||||
|
@ -776,6 +785,14 @@ void coap_pending_clear(struct coap_pending *pending);
|
|||
*/
|
||||
void coap_reply_clear(struct coap_reply *reply);
|
||||
|
||||
/**
|
||||
* @brief Cancels all replies, so they become available again.
|
||||
*
|
||||
* @param replies Pointer to the array of #coap_reply structures
|
||||
* @param len Size of the array of #coap_reply structures
|
||||
*/
|
||||
void coap_replies_clear(struct coap_reply *replies, size_t len);
|
||||
|
||||
/**
|
||||
* @brief Indicates that this resource was updated and that the @a
|
||||
* notify callback should be called for every registered observer.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue