From 4be11aacb053c2f3d1cd5b5e59b9220364287379 Mon Sep 17 00:00:00 2001 From: Anjan Chanda <anjan.chanda@iopsys.eu> Date: Wed, 23 Feb 2022 16:35:57 +0100 Subject: [PATCH] cntlr-sync: conditionally build dynamic controller config sync --- src/agent_map.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/agent_map.c b/src/agent_map.c index 1a00c4d91..46a1022c3 100644 --- a/src/agent_map.c +++ b/src/agent_map.c @@ -4529,7 +4529,9 @@ int handle_hld_message(void *agent, struct cmdu_buff *rx_cmdu) struct tlv *t; uint8_t proto; uint8_t *data; +#ifdef AGENT_SYNC_DYNAMIC_CNTLR_CONFIG bool cntlr_sync = (a->cfg.dyn_cntlr_sync & is_local_cntlr_available()); +#endif int data_len; int tlen = 0; int ret; @@ -4583,6 +4585,7 @@ int handle_hld_message(void *agent, struct cmdu_buff *rx_cmdu) if (ret == 0) send_1905_acknowledge(a, rx_cmdu->origin, cmdu_get_mid(rx_cmdu), NULL, 0); +#ifdef AGENT_SYNC_DYNAMIC_CNTLR_CONFIG if (proto == 0xab && cntlr_sync) { struct cmdu_buff *cmdu; uint8_t res_proto = 0xac; @@ -4642,6 +4645,7 @@ int handle_hld_message(void *agent, struct cmdu_buff *rx_cmdu) if (ret) fprintf(stderr, "failed to write file\n"); } +#endif /* AGENT_SYNC_DYNAMIC_CNTLR_CONFIG */ return ret; } -- GitLab