Extended the test for supported services for routed devices to the device's PROP_PROTOCOL_SERVICES_SUPPORTED.
Support calling of Routed_Device_Service_Approval() with a NULL buffer if just testing for support.
This commit is contained in:
+18
-2
@@ -45,6 +45,13 @@
|
||||
|
||||
/** @file apdu.c Handles APDU services */
|
||||
|
||||
extern int Routed_Device_Service_Approval(
|
||||
BACNET_CONFIRMED_SERVICE service,
|
||||
int service_argument,
|
||||
uint8_t *apdu_buff,
|
||||
uint8_t invoke_id );
|
||||
|
||||
|
||||
/* APDU Timeout in Milliseconds */
|
||||
static uint16_t Timeout_Milliseconds = 3000;
|
||||
/* Number of APDU Retries */
|
||||
@@ -145,9 +152,18 @@ bool apdu_service_supported(
|
||||
/* is it a confirmed service? */
|
||||
for (i = 0; i < MAX_BACNET_CONFIRMED_SERVICE; i++) {
|
||||
if (confirmed_service_supported[i] == service_supported) {
|
||||
if (Confirmed_Function[i] != NULL)
|
||||
status = true;
|
||||
found = true;
|
||||
if (Confirmed_Function[i] != NULL) {
|
||||
#if BAC_ROUTING
|
||||
/* Check to see if the current Device supports this service. */
|
||||
int len = Routed_Device_Service_Approval(
|
||||
service_supported, 0, NULL, 0);
|
||||
if ( len > 0 )
|
||||
break; /* Not supported - return false */
|
||||
#endif
|
||||
|
||||
status = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user