From 0d5c57b1495550a17e2a4a603634b61240accb65 Mon Sep 17 00:00:00 2001 From: skarg Date: Mon, 3 Oct 2011 21:49:10 +0000 Subject: [PATCH] Moved the DCC of the COV handler into the handler. --- bacnet-stack/demo/handler/h_cov.c | 4 ++++ bacnet-stack/demo/server/main.c | 4 +--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/bacnet-stack/demo/handler/h_cov.c b/bacnet-stack/demo/handler/h_cov.c index 7a498b90..17315ead 100644 --- a/bacnet-stack/demo/handler/h_cov.c +++ b/bacnet-stack/demo/handler/h_cov.c @@ -39,6 +39,7 @@ #include "reject.h" #include "cov.h" #include "tsm.h" +#include "dcc.h" /* demo objects */ #include "device.h" #include "handlers.h" @@ -321,6 +322,9 @@ static bool cov_send_request( bool status = false; /* return value */ BACNET_COV_DATA cov_data; + if (!dcc_communication_enabled()) { + return status; + } #if PRINT_ENABLED fprintf(stderr, "COVnotification: requested\n"); #endif diff --git a/bacnet-stack/demo/server/main.c b/bacnet-stack/demo/server/main.c index 83bf9e0a..0c0f9e6e 100644 --- a/bacnet-stack/demo/server/main.c +++ b/bacnet-stack/demo/server/main.c @@ -212,9 +212,7 @@ int main( Device_local_reporting(); #endif } - if (dcc_communication_enabled()) { - handler_cov_task(); - } + handler_cov_task(); /* scan cache address */ address_binding_tmr += elapsed_seconds; if (address_binding_tmr >= 60) {