Secured I-Am request encoding and decoding, and updated the example apps and handlers to use secure version of I-Am decoder. (#1080)
This commit is contained in:
@@ -156,9 +156,9 @@ static void My_I_Am_Bind(
|
||||
bool found = false;
|
||||
bool bind = false;
|
||||
|
||||
(void)service_len;
|
||||
len = iam_decode_service_request(
|
||||
service_request, &device_id, &max_apdu, &segmentation, &vendor_id);
|
||||
len = bacnet_iam_request_decode(
|
||||
service_request, service_len, &device_id, &max_apdu, &segmentation,
|
||||
&vendor_id);
|
||||
if (len > 0) {
|
||||
found = address_bind_request(device_id, NULL, NULL);
|
||||
if (!found) {
|
||||
|
||||
@@ -33,9 +33,9 @@ void handler_i_am_add(
|
||||
int segmentation = 0;
|
||||
uint16_t vendor_id = 0;
|
||||
|
||||
(void)service_len;
|
||||
len = iam_decode_service_request(
|
||||
service_request, &device_id, &max_apdu, &segmentation, &vendor_id);
|
||||
len = bacnet_iam_request_decode(
|
||||
service_request, service_len, &device_id, &max_apdu, &segmentation,
|
||||
&vendor_id);
|
||||
#if PRINT_ENABLED
|
||||
fprintf(stderr, "Received I-Am Request");
|
||||
#endif
|
||||
@@ -73,9 +73,9 @@ void handler_i_am_bind(
|
||||
int segmentation = 0;
|
||||
uint16_t vendor_id = 0;
|
||||
|
||||
(void)service_len;
|
||||
len = iam_decode_service_request(
|
||||
service_request, &device_id, &max_apdu, &segmentation, &vendor_id);
|
||||
len = bacnet_iam_request_decode(
|
||||
service_request, service_len, &device_id, &max_apdu, &segmentation,
|
||||
&vendor_id);
|
||||
if (len > 0) {
|
||||
/* only add address if requested to bind */
|
||||
address_add_binding(device_id, max_apdu, src);
|
||||
|
||||
Reference in New Issue
Block a user