Removes unnecessary outbox_cleanup

The states that were cleaned by this function, CONFIRMED, are no longer reachable.
Itens were marked with this status previously in PUBCOMP and PUBREL
receive handlers.
This commit is contained in:
Euripedes Rocha
2021-07-01 12:05:14 +01:00
parent e24852a4dc
commit ebef896b00
3 changed files with 0 additions and 16 deletions
-14
View File
@@ -210,20 +210,6 @@ int outbox_get_size(outbox_handle_t outbox)
return siz;
}
esp_err_t outbox_cleanup(outbox_handle_t outbox, int max_size)
{
while (outbox_get_size(outbox) > max_size) {
outbox_item_handle_t item = outbox_dequeue(outbox, CONFIRMED, NULL);
if (item == NULL) {
return ESP_FAIL;
}
STAILQ_REMOVE(outbox, item, outbox_item, next);
free(item->buffer);
free(item);
}
return ESP_OK;
}
void outbox_delete_all_items(outbox_handle_t outbox)
{
outbox_item_handle_t item, tmp;