From b05485e88e2389a025b2914365cb3e0c5c4b85fb Mon Sep 17 00:00:00 2001 From: d-serj Date: Sun, 31 May 2026 14:53:23 +0000 Subject: [PATCH 1/3] Fix FreeRTOS.h include in eebus_malloc.h --- src/common/eebus_malloc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/eebus_malloc.h b/src/common/eebus_malloc.h index 98fe3f3..7eaafe2 100644 --- a/src/common/eebus_malloc.h +++ b/src/common/eebus_malloc.h @@ -22,7 +22,7 @@ #define SRC_COMMON_EEBUS_MALLOC_H_ #if defined(__freertos__) -#include +#include #define EEBUS_MALLOC(size) pvPortMalloc((size)) #define EEBUS_FREE(size) vPortFree((size)) From 4a83c3aacf38177339ab2d84d8d932c782c46331 Mon Sep 17 00:00:00 2001 From: d-serj Date: Sat, 6 Jun 2026 12:08:29 +0000 Subject: [PATCH 2/3] Add MdnsNotifyFoundEntries function to handle found mDNS entries in mdns_freertos --- src/ship/mdns/ship_mdns_freertos.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/ship/mdns/ship_mdns_freertos.c b/src/ship/mdns/ship_mdns_freertos.c index ac04b61..12759b0 100644 --- a/src/ship/mdns/ship_mdns_freertos.c +++ b/src/ship/mdns/ship_mdns_freertos.c @@ -87,6 +87,7 @@ static void Stop(ShipMdnsObject* self); static EebusError RegisterService(ShipMdnsObject* self); static void DeregisterService(ShipMdnsObject* self); static void SetAutoaccept(ShipMdnsObject* self, bool autoaccept); +static void MdnsNotifyFoundEntries(Mdns* mdns); static const ShipMdnsInterface mdns_methods = { .destruct = Destruct, @@ -217,6 +218,20 @@ void MdnsQueryNotifyCallback(mdns_search_once_t* search) { xSemaphoreGive(mdns->semaphore); } +static void MdnsNotifyFoundEntries(Mdns* mdns) { + const size_t found_count = VectorGetSize(mdns->found_entries); + Vector* const copy = VectorCreateWithDeallocator(MdnsEntryDeallocator); + + for (size_t i = 0; i < found_count; ++i) { + MdnsEntry* const entry = (MdnsEntry*)VectorGetElement(mdns->found_entries, i); + if (entry != NULL) { + VectorPushBack(copy, MdnsEntryCopy(entry)); + } + } + + mdns->on_entries_found_cb(copy, mdns->context); +} + void MdnsProcessSearchResult(Mdns* mdns, mdns_search_once_t* search) { mdns_result_t* results = NULL; @@ -251,8 +266,7 @@ void MdnsProcessSearchResult(Mdns* mdns, mdns_search_once_t* search) { } mdns_query_results_free(results); - - mdns->on_entries_found_cb(mdns->found_entries, mdns->context); + MdnsNotifyFoundEntries(mdns); } uint32_t GetUpdateIntervalMs(void) { From a84cbf369a70bee6341668f2adb6da778f36405b Mon Sep 17 00:00:00 2001 From: d-serj Date: Sun, 14 Jun 2026 16:22:03 +0000 Subject: [PATCH 3/3] Remove unused include for ship_connection types in ship_mdns_bonjour.c --- src/ship/mdns/ship_mdns_bonjour.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/ship/mdns/ship_mdns_bonjour.c b/src/ship/mdns/ship_mdns_bonjour.c index 492c710..4425418 100644 --- a/src/ship/mdns/ship_mdns_bonjour.c +++ b/src/ship/mdns/ship_mdns_bonjour.c @@ -92,7 +92,6 @@ #include "src/common/vector.h" #include "src/ship/api/mdns_entry.h" #include "src/ship/api/ship_mdns_interface.h" -#include "src/ship/ship_connection/types.h" /** Set MDNS_DEBUG 1 to enable debug prints */ #ifndef MDNS_DEBUG