diff --git a/src/client/clientPut.cpp b/src/client/clientPut.cpp index bb481e8..1468c21 100644 --- a/src/client/clientPut.cpp +++ b/src/client/clientPut.cpp @@ -205,13 +205,13 @@ namespace pvac { Operation ClientChannel::put(PutCallback* cb, epics::pvData::PVStructure::const_shared_pointer pvRequest, - bool getcurrent) + bool getprevious) { if(!impl) throw std::logic_error("Dead Channel"); if(!pvRequest) pvRequest = pvd::createRequest("field()"); - std::tr1::shared_ptr ret(Putter::build(cb, getcurrent)); + std::tr1::shared_ptr ret(Putter::build(cb, getprevious)); { Guard G(ret->mutex); diff --git a/src/client/clientRPC.cpp b/src/client/clientRPC.cpp index ff6d54d..c555645 100644 --- a/src/client/clientRPC.cpp +++ b/src/client/clientRPC.cpp @@ -29,6 +29,7 @@ struct RPCer : public pvac::detail::CallbackStorage, operation_type::shared_pointer op; pvac::ClientChannel::GetCallback *cb; + // 'event' may be modified as long as cb!=NULL pvac::GetEvent event; pvd::PVStructure::const_shared_pointer args; @@ -110,6 +111,7 @@ struct RPCer : public pvac::detail::CallbackStorage, { std::tr1::shared_ptr keepalive(internal_shared_from_this()); CallbackGuard G(*this); + if(!cb) return; event.message = "Disconnect"; callEvent(G); diff --git a/src/client/pva/client.h b/src/client/pva/client.h index b5e25e1..89c3a74 100644 --- a/src/client/pva/client.h +++ b/src/client/pva/client.h @@ -385,7 +385,7 @@ public: //! If false, then previous=NULL Operation put(PutCallback* cb, epics::pvData::PVStructure::const_shared_pointer pvRequest = epics::pvData::PVStructure::const_shared_pointer(), - bool getcurrent = false); + bool getprevious = false); //! Synchronious put operation inline