Two quick fixes for sending unicast I-Am - corrected name of handler, and added the destination copy.

This commit is contained in:
tbrennan3
2010-03-01 15:43:06 +00:00
parent cd33aa18e9
commit 9327994aef
2 changed files with 6 additions and 2 deletions
+5 -1
View File
@@ -125,11 +125,15 @@ int iam_unicast_encode_pdu(
int pdu_len = 0;
BACNET_ADDRESS my_address;
/* The destination will be the same as the src, so copy it over. */
memcpy( dest, src, sizeof( BACNET_ADDRESS ) );
dest->net = 0;
datalink_get_my_address(&my_address);
/* encode the NPDU portion of the packet */
npdu_encode_npdu_data(npdu_data, false, MESSAGE_PRIORITY_NORMAL);
npdu_len =
npdu_encode_pdu(&buffer[0], src, &my_address,
npdu_encode_pdu(&buffer[0], dest, &my_address,
npdu_data);
/* encode the APDU portion of the packet */
apdu_len =
+1 -1
View File
@@ -59,7 +59,7 @@ extern "C" {
uint16_t service_len,
BACNET_ADDRESS * src);
void handler_who_is_whois(
void handler_who_is_unicast(
uint8_t * service_request,
uint16_t service_len,
BACNET_ADDRESS * src);