Compare commits

..
2 Commits
Author SHA1 Message Date
didas 6a71c2863d fix: Added buffer releasing to requester task 2026-07-01 11:37:55 +01:00
didas c8ebbb2946 fix: Added localhost to intra-routing filter 2026-07-01 11:37:40 +01:00
2 changed files with 7 additions and 3 deletions
+2 -1
View File
@@ -95,7 +95,8 @@ void incphub_task_main(void *params)
// === Private functions ===
static int handle_nil_packet(nil_packet_t *nil)
{
if (nil->header.dst_addr == INCPHUB_LOCAL_NIL_ADDR)
if (nil->header.dst_addr == INCPHUB_LOCAL_NIL_ADDR
|| nil->header.dst_addr == NIL_ADDR_LOCALHOST)
{
ntl_packet_t *ntl = extract_ntl_packet(nil);
if (ntl == NULL)
+5 -2
View File
@@ -62,9 +62,12 @@ void requester_task_main(void *params)
// Read reply message
uint32_t num = *(uint32_t*)buffer;
// Release buffer
incphub_release_msg_buffer(cli, buffer);
// Profit (send to UART to ensure it worked)
char strbuf[32];
sprintf(strbuf, "%u\r\n", num);
HAL_UART_Transmit(&huart2, strbuf, strlen(strbuf), 9999);
sprintf(strbuf, "%lu\r\n", num);
HAL_UART_Transmit(&huart2, (uint8_t*)strbuf, strlen(strbuf), 9999);
}
}