Fix confirmed service with service supported enumeration

This commit is contained in:
Steve Karg
2022-08-17 23:21:39 -05:00
parent 2349264d81
commit 8cddaa5881
4 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -512,7 +512,7 @@ extern "C" {
void); void);
BACNET_STACK_EXPORT BACNET_STACK_EXPORT
int Routed_Device_Service_Approval( int Routed_Device_Service_Approval(
BACNET_CONFIRMED_SERVICE service, BACNET_SERVICES_SUPPORTED service,
int service_argument, int service_argument,
uint8_t * apdu_buff, uint8_t * apdu_buff,
uint8_t invoke_id); uint8_t invoke_id);
+3 -3
View File
@@ -613,14 +613,14 @@ void Routed_Device_Inc_Database_Revision(void)
* just 1 if no apdu_buff was supplied and service is not supported, * just 1 if no apdu_buff was supplied and service is not supported,
* else 0 if service is approved for the current device. * else 0 if service is approved for the current device.
*/ */
int Routed_Device_Service_Approval(BACNET_CONFIRMED_SERVICE service, int Routed_Device_Service_Approval(BACNET_SERVICES_SUPPORTED service,
int service_argument, int service_argument,
uint8_t *apdu_buff, uint8_t *apdu_buff,
uint8_t invoke_id) uint8_t invoke_id)
{ {
int len = 0; int len = 0;
switch (service) { switch (service) {
case SERVICE_CONFIRMED_REINITIALIZE_DEVICE: case SERVICE_SUPPORTED_REINITIALIZE_DEVICE:
/* If not the gateway device, we don't support RD */ /* If not the gateway device, we don't support RD */
if (iCurrent_Device_Idx > 0) { if (iCurrent_Device_Idx > 0) {
if (apdu_buff != NULL) { if (apdu_buff != NULL) {
@@ -631,7 +631,7 @@ int Routed_Device_Service_Approval(BACNET_CONFIRMED_SERVICE service,
} }
} }
break; break;
case SERVICE_CONFIRMED_DEVICE_COMMUNICATION_CONTROL: case SERVICE_SUPPORTED_DEVICE_COMMUNICATION_CONTROL:
/* If not the gateway device, we don't support DCC */ /* If not the gateway device, we don't support DCC */
if (iCurrent_Device_Idx > 0) { if (iCurrent_Device_Idx > 0) {
if (apdu_buff != NULL) { if (apdu_buff != NULL) {
+1 -1
View File
@@ -169,7 +169,7 @@ void handler_device_communication_control(uint8_t *service_request,
#ifdef BAC_ROUTING #ifdef BAC_ROUTING
/* Check to see if the current Device supports this service. */ /* Check to see if the current Device supports this service. */
len = Routed_Device_Service_Approval( len = Routed_Device_Service_Approval(
SERVICE_CONFIRMED_DEVICE_COMMUNICATION_CONTROL, (int)state, SERVICE_SUPPORTED_DEVICE_COMMUNICATION_CONTROL, (int)state,
&Handler_Transmit_Buffer[pdu_len], service_data->invoke_id); &Handler_Transmit_Buffer[pdu_len], service_data->invoke_id);
if (len > 0) if (len > 0)
goto DCC_ABORT; goto DCC_ABORT;
+1 -1
View File
@@ -126,7 +126,7 @@ void handler_reinitialize_device(uint8_t *service_request,
#ifdef BAC_ROUTING #ifdef BAC_ROUTING
/* Check to see if the current Device supports this service. */ /* Check to see if the current Device supports this service. */
len = Routed_Device_Service_Approval( len = Routed_Device_Service_Approval(
SERVICE_CONFIRMED_REINITIALIZE_DEVICE, (int)rd_data.state, SERVICE_SUPPORTED_REINITIALIZE_DEVICE, (int)rd_data.state,
&Handler_Transmit_Buffer[pdu_len], service_data->invoke_id); &Handler_Transmit_Buffer[pdu_len], service_data->invoke_id);
if (len > 0) if (len > 0)
goto RD_ABORT; goto RD_ABORT;