Fixed BACnet/SC secure connect VMAC, UUID, and initialization sequence (#1142)
* Refactored the BACnet/SC datalink initialization order by moving certificate file checks and hub connection registration to occur after datalink initialization * Replaced stdlib rand() with platform-specific cryptographically secure random functions (RtlGenRandom for Windows, getrandom for Linux, arc4random_buf for BSD) to generate UUID and VMAC addresses, preventing duplicates that broke connections * Enabled conditional debug output in BACnet/SC components when BUILD=debug is specified
This commit is contained in:
@@ -16,10 +16,8 @@
|
||||
#include "websocket-global.h"
|
||||
#include <arpa/inet.h>
|
||||
|
||||
#define DEBUG_WEBSOCKET_SERVER 0
|
||||
|
||||
#undef DEBUG_PRINTF
|
||||
#if DEBUG_WEBSOCKET_SERVER == 1
|
||||
#if DEBUG_WEBSOCKET_SERVER
|
||||
#define DEBUG_PRINTF debug_printf
|
||||
#else
|
||||
#undef DEBUG_ENABLED
|
||||
|
||||
Reference in New Issue
Block a user