From 0dde44beb6cf3df55613794d07613961914da91a Mon Sep 17 00:00:00 2001
From: Janusz Dziedzic <janusz.dziedzic@iopsys.eu>
Date: Fri, 15 Sep 2023 15:36:10 +0200
Subject: [PATCH] report channel after CSR

---
 src/agent_map.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/agent_map.c b/src/agent_map.c
index 13db93391..825a09dc4 100644
--- a/src/agent_map.c
+++ b/src/agent_map.c
@@ -3245,8 +3245,10 @@ int agent_process_channel_pref_tlv(void *agent, struct tlv_channel_pref *p,
 	memcpy(&radio->req_opclass, &opclass, sizeof(opclass));
 
 	/* Don't fail if all opclasses/channels with pref=0 */
-	if (!target_opclass || !target_channel)
+	if (!target_opclass || !target_channel) {
+		radio->report_oper_channel = true;
 		goto exit;
+	}
 
 	if (ret) {
 		memcpy(channel_resp[*channel_resp_nr].radio_id, radio_id, 6);
-- 
GitLab