From f948a4fbb0eef30cfc0ef822a6bb6fa67d1fddb2 Mon Sep 17 00:00:00 2001 From: Michael Davidsaver Date: Fri, 31 Jan 2025 21:27:02 -0800 Subject: [PATCH] client: log invalid monitor queueSize --- src/clientmon.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/clientmon.cpp b/src/clientmon.cpp index 4ab1600..a2a62b3 100644 --- a/src/clientmon.cpp +++ b/src/clientmon.cpp @@ -757,10 +757,17 @@ std::shared_ptr MonitorBuilder::exec() auto options = op->pvRequest["record._options"]; - options["queueSize"].as([&op](uint32_t Q) { - if(Q>1) + if(auto queueSize = options["queueSize"]) { + uint32_t Q = 0; + if(queueSize.as(Q) && Q>1) { op->queueSize = Q; - }); + } else { + log_warn_printf(monevt, "%s requested invalid %s : %s\n", + op->channelName.c_str(), + op->pvRequest.nameOf(queueSize).c_str(), + std::string(SB()<pipeline);