From 7cd61abac0b263c8acf4525ea4a102b13daae640 Mon Sep 17 00:00:00 2001
From: Anjan Chanda <anjan.chanda@iopsys.eu>
Date: Wed, 23 Feb 2022 17:14:39 +0100
Subject: [PATCH] cntlr-sync: fixup build - dynamic cntlr config sync

---
 src/agent_ubus.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/agent_ubus.c b/src/agent_ubus.c
index 68bd6c31c..3b03e52e6 100644
--- a/src/agent_ubus.c
+++ b/src/agent_ubus.c
@@ -812,6 +812,7 @@ error:
 	return UBUS_STATUS_UNKNOWN_ERROR;
 }
 
+#if AGENT_SYNC_DYNAMIC_CNTLR_CONFIG
 static int sync_dyn_controller_config(struct ubus_context *ctx, struct ubus_object *obj,
 				      struct ubus_request_data *req, const char *method,
 				      struct blob_attr *msg)
@@ -852,6 +853,7 @@ static int sync_dyn_controller_config(struct ubus_context *ctx, struct ubus_obje
 error:
 	return UBUS_STATUS_UNKNOWN_ERROR;
 }
+#endif
 
 static int cmd(struct ubus_context *ctx, struct ubus_object *obj,
 		      struct ubus_request_data *req, const char *method,
@@ -1175,7 +1177,9 @@ int agent_publish_object(struct agent *a, const char *objname)
 		UBUS_METHOD("assoc_notify", assoc_notify,
 				assoc_notify_params),
 		UBUS_METHOD("pref_channels", pref_channels, pref_channels_params),
+#ifdef AGENT_SYNC_DYNAMIC_CNTLR_CONFIG
 		UBUS_METHOD_NOARG("sync", sync_dyn_controller_config),
+#endif
 	};
 	int num_methods = ARRAY_SIZE(m);
 	struct ubus_object_type *obj_type;
-- 
GitLab