From 5903b0819664f473d1279de57e8b00d60d76ae0e Mon Sep 17 00:00:00 2001 From: Uros Majstorovic Date: Tue, 14 May 2024 22:59:12 +0200 Subject: dir protocol improvement --- ecp/server/dir.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'ecp/server/dir.h') diff --git a/ecp/server/dir.h b/ecp/server/dir.h index 022010a..fee3a5e 100644 --- a/ecp/server/dir.h +++ b/ecp/server/dir.h @@ -1,7 +1,5 @@ -#define MAX_DIR_ITEM_IN_MSG ((ECP_MAX_PLD - ECP_SIZE_PLD((2 + sizeof(uint16_t)), ECP_MTYPE_DIR_REP)) / ECP_SIZE_DIR_ITEM) - #define MAX_DIR_MSG 10 -#define MAX_DIR_ITEM (MAX_DIR_MSG * MAX_DIR_ITEM_IN_MSG) +#define MAX_DIR_ITEM (MAX_DIR_MSG * ECP_MAX_DIR_ITEM_IN_MSG) #define MAX_DIR_ITEM_DIR 100 #define MAX_REGION 10 @@ -42,7 +40,7 @@ typedef struct DIRNode { typedef struct DIRList { struct { uint8_t count; - unsigned char buffer[MAX_DIR_ITEM_IN_MSG * ECP_SIZE_DIR_ITEM]; + unsigned char buffer[ECP_MAX_DIR_ITEM_IN_MSG * ECP_SIZE_DIR_ITEM]; } msg[MAX_DIR_MSG]; uint8_t msg_count; } DIRList; -- cgit v1.2.3