From 7536841c3e5e16553b6ddda39dd5c87fcbd905b7 Mon Sep 17 00:00:00 2001
From: Martin Hierholzer <martin.hierholzer@desy.de>
Date: Thu, 26 May 2016 18:23:49 +0200
Subject: [PATCH] fix for latest version of DeviceAccess: the function
 replace() has to be used instead of the operator=() to re-assign a register
 accessor

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

diff --git a/src/InstaCoSADev.cc b/src/InstaCoSADev.cc
index a11ac32f..246ffdf6 100644
--- a/src/InstaCoSADev.cc
+++ b/src/InstaCoSADev.cc
@@ -55,7 +55,9 @@ namespace mtca4u {
       if(reg.getNumberOfDimensions() == 0) {
         ScalarRegisterAccessor<int> accessor = device.getScalarRegisterAccessor<int>(reg.getRegisterName());
         boost::shared_ptr< ProcessScalar<int> > pv = impl->processVariableManager->createProcessScalar<int>(mtca4u::deviceToControlSystem, pvName);
-        impl->scalarIntMap[baseName] = std::make_pair(accessor,pv);
+        auto mypair = impl->scalarIntMap[baseName];
+        mypair.first.replace(accessor);
+        mypair.second = pv;
       }
       else if(reg.getNumberOfDimensions() == 1) {
         throw std::string("not yet implemented.");
-- 
GitLab