significant upgrade to selftest, added echotest, better checks for data in queue before socket closure
This commit is contained in:
@@ -33,6 +33,8 @@
|
||||
#include "pico_socket.h"
|
||||
#include "heap.h"
|
||||
|
||||
#include "../../../include/Debug.hpp"
|
||||
|
||||
/* Mockables */
|
||||
#if defined UNIT_TEST
|
||||
# define MOCKABLE __attribute__((weak))
|
||||
@@ -831,13 +833,13 @@ pico_timer_ref_add(pico_time expire, struct pico_timer *t, uint32_t id, uint32_t
|
||||
tref.hash = hash;
|
||||
|
||||
if (heap_insert(Timers, &tref) < 0) {
|
||||
dbg("Error: failed to insert timer(ID %u) into heap\n", id);
|
||||
DEBUG_ERROR("Error: failed to insert timer(ID %u) into heap", id);
|
||||
PICO_FREE(t);
|
||||
pico_err = PICO_ERR_ENOMEM;
|
||||
return 0;
|
||||
}
|
||||
if (Timers->n > PICO_MAX_TIMERS) {
|
||||
dbg("Warning: I have %d timers\n", (int)Timers->n);
|
||||
DEBUG_ERROR("Warning: I have %d timers", (int)Timers->n);
|
||||
}
|
||||
|
||||
return tref.id;
|
||||
|
||||
Reference in New Issue
Block a user