From 48c756bc11ee61a9430d2aefeda32a51fafe39c8 Mon Sep 17 00:00:00 2001 From: skarg Date: Tue, 21 Feb 2012 21:53:37 +0000 Subject: [PATCH] Removed checks for previous BVLC messages since that is not correct behavior for BIP, especially when a WhoIs, I-Am, ReadProperty sequence occurs. This was causing messages to be sent as broadcast instead of unicast. --- bacnet-stack/src/bip.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/bacnet-stack/src/bip.c b/bacnet-stack/src/bip.c index a71ef8ba..62328593 100644 --- a/bacnet-stack/src/bip.c +++ b/bacnet-stack/src/bip.c @@ -157,20 +157,16 @@ int bip_send_pdu( /* addr and port in host format */ struct in_addr address; uint16_t port = 0; - BACNET_BVLC_FUNCTION function; - (void) npdu_data; /* assumes that the driver has already been initialized */ - if (BIP_Socket < 0) + if (BIP_Socket < 0) { return BIP_Socket; + } mtu[0] = BVLL_TYPE_BACNET_IP; bip_dest.sin_family = AF_INET; - function = bvlc_get_function_code(); /* What type of BVLC was it? */ - if ( (dest->net == BACNET_BROADCAST_NETWORK) || - (function == BVLC_FORWARDED_NPDU) || - (function == BVLC_ORIGINAL_BROADCAST_NPDU) ) { + if (dest->net == BACNET_BROADCAST_NETWORK) { /* broadcast */ address.s_addr = BIP_Broadcast_Address.s_addr; port = BIP_Port;