taming the memory monster

This commit is contained in:
Sebastien
2020-03-02 18:03:47 -05:00
parent aa71866a17
commit 5ab1f04ea5
15 changed files with 583 additions and 46 deletions

View File

@@ -9,7 +9,8 @@ typedef enum {
} messaging_types;
typedef enum {
MESSAGING_CLASS_OTA,
MESSAGING_CLASS_SYSTEM
MESSAGING_CLASS_SYSTEM,
MESSAGING_CLASS_STATS
} messaging_classes;
typedef struct messaging_list_t *messaging_handle_t;
@@ -18,7 +19,8 @@ typedef struct {
time_t sent_time;
messaging_types type;
messaging_classes msg_class;
char message[151];
size_t msg_size;
char message[];
} single_message_t;
cJSON * messaging_retrieve_messages(RingbufHandle_t buf_handle);