Fix [bug#80] npdu_decode via deprecation (#447)
* Fix [bug#80] npdu_decode via deprecation --------- Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
This commit is contained in:
@@ -281,7 +281,7 @@ void routing_npdu_handler(
|
||||
|
||||
/* only handle the version that we know how to handle */
|
||||
if (pdu[0] == BACNET_PROTOCOL_VERSION) {
|
||||
apdu_offset = npdu_decode(&pdu[0], &dest, src, &npdu_data);
|
||||
apdu_offset = bacnet_npdu_decode(pdu, pdu_len, &dest, src, &npdu_data);
|
||||
if (apdu_offset <= 0) {
|
||||
debug_printf("NPDU: Decoding failed; Discarded!\n");
|
||||
} else if (npdu_data.network_layer_message) {
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include "bacnet/bacnet_stack_exports.h"
|
||||
#include "bacnet/basic/sys/platform.h"
|
||||
#include "bacnet/bacdef.h"
|
||||
#include "bacnet/bacenum.h"
|
||||
|
||||
@@ -98,6 +99,7 @@ extern "C" {
|
||||
BACNET_NPDU_DATA * dest,
|
||||
BACNET_NPDU_DATA * src);
|
||||
|
||||
BACNET_STACK_DEPRECATED("Use bacnet_npdu_decode() instead")
|
||||
BACNET_STACK_EXPORT
|
||||
int npdu_decode(
|
||||
uint8_t * npdu,
|
||||
|
||||
Reference in New Issue
Block a user