Added a hack for 5.4.5.1 - IDLE, when a ConfirmedBroadcastReceived, then enter IDLE - ignore the PDU.

This commit is contained in:
skarg
2013-07-12 22:43:37 +00:00
parent 5f3cba01fe
commit bf1c365795
+10 -2
View File
@@ -85,8 +85,16 @@ void npdu_handler(
/* only handle the version that we know how to handle */ /* only handle the version that we know how to handle */
/* and we are not a router, so ignore messages with /* and we are not a router, so ignore messages with
routing information cause they are not for us */ routing information cause they are not for us */
apdu_handler(src, &pdu[apdu_offset], if ((dest.net == BACNET_BROADCAST_NETWORK) &&
(uint16_t) (pdu_len - apdu_offset)); ((pdu[apdu_offset] & 0xF0) ==
PDU_TYPE_CONFIRMED_SERVICE_REQUEST)) {
/* hack for 5.4.5.1 - IDLE */
/* ConfirmedBroadcastReceived */
/* then enter IDLE - ignore the PDU */
} else {
apdu_handler(src, &pdu[apdu_offset],
(uint16_t) (pdu_len - apdu_offset));
}
} else { } else {
#if PRINT_ENABLED #if PRINT_ENABLED
printf("NPDU: DNET=%u. Discarded!\n", (unsigned) dest.net); printf("NPDU: DNET=%u. Discarded!\n", (unsigned) dest.net);