Skip to content

Commit

Permalink
Bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
RainerZ committed Nov 28, 2024
1 parent c2d4591 commit eebe736
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion xcplib/main_cfg.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@
#define OPTION_DEFAULT_DBG_LEVEL 3

// @@@@
#define PLATFORM_ENABLE_GET_LOCAL_ADDR
//#define PLATFORM_ENABLE_GET_LOCAL_ADDR
6 changes: 5 additions & 1 deletion xcplib/src/xcpEthTl.c
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,11 @@ void XcpEthTlGetInfo(BOOL* isTcp, uint8_t* mac, uint8_t* addr, uint16_t *port) {

if (isTcp!=NULL) *isTcp = gXcpTl.ServerUseTCP;
if (addr!=NULL) memcpy(addr, gXcpTl.ServerAddr, 4);
if (mac!=NULL) memcpy(mac, gXcpTl.ServerMac, 4);
#ifdef PLATFORM_ENABLE_GET_LOCAL_ADDR
if (mac!=NULL) memcpy(mac, gXcpTl.ServerMac, 6);
#else
if (mac!=NULL) memset(mac, 0, 6);
#endif
if (port!=NULL) *port = gXcpTl.ServerPort;
}

Expand Down

0 comments on commit eebe736

Please sign in to comment.