Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit eebe736

Browse files
committedNov 28, 2024·
Bugfix
1 parent c2d4591 commit eebe736

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed
 

‎xcplib/main_cfg.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,4 @@
5555
#define OPTION_DEFAULT_DBG_LEVEL 3
5656

5757
// @@@@
58-
#define PLATFORM_ENABLE_GET_LOCAL_ADDR
58+
//#define PLATFORM_ENABLE_GET_LOCAL_ADDR

‎xcplib/src/xcpEthTl.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,11 @@ void XcpEthTlGetInfo(BOOL* isTcp, uint8_t* mac, uint8_t* addr, uint16_t *port) {
475475

476476
if (isTcp!=NULL) *isTcp = gXcpTl.ServerUseTCP;
477477
if (addr!=NULL) memcpy(addr, gXcpTl.ServerAddr, 4);
478-
if (mac!=NULL) memcpy(mac, gXcpTl.ServerMac, 4);
478+
#ifdef PLATFORM_ENABLE_GET_LOCAL_ADDR
479+
if (mac!=NULL) memcpy(mac, gXcpTl.ServerMac, 6);
480+
#else
481+
if (mac!=NULL) memset(mac, 0, 6);
482+
#endif
479483
if (port!=NULL) *port = gXcpTl.ServerPort;
480484
}
481485

0 commit comments

Comments
 (0)
Please sign in to comment.