Remove and fix old usage of MAX_HEADER (#331)
Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
This commit is contained in:
@@ -56,8 +56,6 @@
|
||||
#include "bacnet/datalink/bvlc6.h"
|
||||
#include "bacnet/datalink/bip6.h"
|
||||
#include "bacnet/basic/bbmd6/h_bbmd6.h"
|
||||
#undef MAX_HEADER
|
||||
#undef MAX_MPDU
|
||||
#include "bacnet/datalink/bip.h"
|
||||
#include "bacnet/datalink/bvlc.h"
|
||||
#include "bacnet/basic/bbmd/h_bbmd.h"
|
||||
|
||||
@@ -54,8 +54,6 @@
|
||||
#include "bacport.h"
|
||||
/* our datalink layers */
|
||||
#include "bacnet/datalink/dlmstp.h"
|
||||
#undef MAX_HEADER
|
||||
#undef MAX_MPDU
|
||||
#include "bacnet/datalink/bip.h"
|
||||
#include "bacnet/datalink/bvlc.h"
|
||||
#include "bacnet/basic/bbmd/h_bbmd.h"
|
||||
|
||||
@@ -126,7 +126,7 @@ int dlmstp_send_pdu(BACNET_ADDRESS *dest, /* destination address */
|
||||
Transmit_Packet.pdu[i] = pdu[i];
|
||||
}
|
||||
bacnet_address_copy(&Transmit_Packet.address, dest);
|
||||
bytes_sent = pdu_len + MAX_HEADER;
|
||||
bytes_sent = pdu_len + DLMSTP_HEADER_MAX;
|
||||
Transmit_Packet.ready = true;
|
||||
}
|
||||
|
||||
@@ -282,7 +282,7 @@ uint16_t MSTP_Get_Send(
|
||||
} else {
|
||||
destination = MSTP_BROADCAST_ADDRESS;
|
||||
}
|
||||
if ((MAX_HEADER + Transmit_Packet.pdu_len) > DLMSTP_MPDU_MAX) {
|
||||
if ((DLMSTP_HEADER_MAX + Transmit_Packet.pdu_len) > DLMSTP_MPDU_MAX) {
|
||||
return 0;
|
||||
}
|
||||
/* convert the PDU into the MSTP Frame */
|
||||
@@ -421,7 +421,7 @@ uint16_t MSTP_Get_Reply(
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
if ((MAX_HEADER + Transmit_Packet.pdu_len) > DLMSTP_MPDU_MAX) {
|
||||
if ((DLMSTP_HEADER_MAX + Transmit_Packet.pdu_len) > DLMSTP_MPDU_MAX) {
|
||||
return 0;
|
||||
}
|
||||
/* is this the reply to the DER? */
|
||||
|
||||
@@ -111,7 +111,7 @@ int dlmstp_send_pdu(BACNET_ADDRESS *dest, /* destination address */
|
||||
Transmit_Packet.pdu[i] = pdu[i];
|
||||
}
|
||||
bacnet_address_copy(&Transmit_Packet.address, dest);
|
||||
bytes_sent = pdu_len + MAX_HEADER;
|
||||
bytes_sent = pdu_len + DLMSTP_HEADER_MAX;
|
||||
Transmit_Packet.ready = true;
|
||||
}
|
||||
|
||||
@@ -267,7 +267,7 @@ uint16_t MSTP_Get_Send(
|
||||
} else {
|
||||
destination = MSTP_BROADCAST_ADDRESS;
|
||||
}
|
||||
if ((MAX_HEADER + Transmit_Packet.pdu_len) > DLMSTP_MPDU_MAX) {
|
||||
if ((DLMSTP_HEADER_MAX + Transmit_Packet.pdu_len) > DLMSTP_MPDU_MAX) {
|
||||
return 0;
|
||||
}
|
||||
/* convert the PDU into the MSTP Frame */
|
||||
@@ -407,7 +407,7 @@ uint16_t MSTP_Get_Reply(
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
if ((MAX_HEADER + Transmit_Packet.pdu_len) > DLMSTP_MPDU_MAX) {
|
||||
if ((DLMSTP_HEADER_MAX + Transmit_Packet.pdu_len) > DLMSTP_MPDU_MAX) {
|
||||
return 0;
|
||||
}
|
||||
/* is this the reply to the DER? */
|
||||
|
||||
Reference in New Issue
Block a user