From 94b48e489377d766e50ff1045c0822e5a2b40422 Mon Sep 17 00:00:00 2001 From: Sinisa Veseli Date: Tue, 30 Apr 2024 13:09:33 -0500 Subject: [PATCH] do not proceed with pvcopy in master field callback unless master field was requested --- src/pvAccess/monitorFactory.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/pvAccess/monitorFactory.cpp b/src/pvAccess/monitorFactory.cpp index c467c50..2e9e7e5 100644 --- a/src/pvAccess/monitorFactory.cpp +++ b/src/pvAccess/monitorFactory.cpp @@ -292,6 +292,12 @@ void MonitorLocal::dataPut(PVRecordFieldPtr const & pvRecordField) { cout << "MonitorLocal::dataPut(pvRecordField)" << endl; } + // If this record field is the master field, and the master field was not + // requested, we do not proceed with copy + bool isMasterField = pvRecordField->getPVRecord()->getPVStructure()->getFieldOffset()==0; + if (isMasterField && !pvCopy->isMasterFieldRequested()) { + return; + } if(state!=active) return; { Lock xx(mutex);