Fixed zephyr bip_get_addr endian UDP port number

This commit is contained in:
Steve Karg
2024-04-22 08:11:18 -05:00
parent 770be70688
commit f929a10ad2
2 changed files with 7 additions and 7 deletions
+6 -6
View File
@@ -170,15 +170,15 @@ void bip_get_broadcast_address(BACNET_ADDRESS *dest)
}
/**
* Set the BACnet/IP address
*
* @param addr - network IPv4 address
* @brief Set the BACnet/IP address
* @param addr - network IPv4 address (in network byte order)
* @return true if the address was set
*/
bool bip_set_addr(BACNET_IP_ADDRESS *addr)
{
if (addr) {
memcpy(&BIP_Address.s_addr, &addr->address[0], IP_ADDRESS_MAX);
BIP_Port = htons(addr->port);
BIP_Port = addr->port;
return true;
}
return false;
@@ -186,14 +186,14 @@ bool bip_set_addr(BACNET_IP_ADDRESS *addr)
/**
* @brief Get the BACnet/IP address
* @param addr - network IPv4 address
* @param addr - network IPv4 address (in network byte order)
* @return true if the address was retrieved
*/
bool bip_get_addr(BACNET_IP_ADDRESS *addr)
{
if (addr) {
memcpy(&addr->address[0], &BIP_Address.s_addr, IP_ADDRESS_MAX);
addr->port = ntohs(BIP_Port);
addr->port = BIP_Port;
return true;
}
return false;
+1 -1
View File
@@ -268,7 +268,7 @@ config BACNET_BASIC_OBJECT_DEVICE_CLIENT
bool "Use the BACnet basic device-client object"
default false
help
Use the BACnet basic device-server object
Use the BACnet basic device-client object
config BACNET_BASIC_OBJECT_INTEGER_VALUE
bool "Use the BACnet basic integer value object"