From 33798897fb2d0e306828a48186ec748b83b2edff Mon Sep 17 00:00:00 2001 From: Sang Woo Kim Date: Fri, 22 May 2026 11:41:56 +0900 Subject: [PATCH] qsrv: SecurityLogger must restore dbChannel addr.pfield Missing initialization of SecurityLogger::pchan prevents restore logic from triggering. Remove default value so that compiler complains if used without initialization. --- ioc/securitylogger.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ioc/securitylogger.h b/ioc/securitylogger.h index f432ae4..41d2079 100644 --- a/ioc/securitylogger.h +++ b/ioc/securitylogger.h @@ -21,8 +21,8 @@ namespace pvxs { namespace ioc { class SecurityLogger { - void* pfieldsave = nullptr; - dbChannel *pchan = nullptr; + void* pfieldsave; + dbChannel *pchan; void* pvt; public: ~SecurityLogger() { @@ -39,12 +39,15 @@ public: } SecurityLogger() - :pvt(nullptr) { - } + :pfieldsave(nullptr) + ,pchan(nullptr) + ,pvt(nullptr) + {} SecurityLogger(dbChannel* pDbChannel, const Credentials& credentials, const SecurityClient& securityClient) :pfieldsave(pDbChannel->addr.pfield) + ,pchan(pDbChannel) ,pvt(asTrapWriteWithData((securityClient.cli)[0], // The user is the first element credentials.cred[0].c_str(), // The user is the first element credentials.host.c_str(),