SharedPV allow rpc() while close()'d

No reason to prevent this as RPCs need not use
the same type (Structure) as get/put/monitor.
This commit is contained in:
Michael Davidsaver
2018-10-02 12:47:50 -07:00
parent 4296c5e015
commit 4e5aef3e42
2 changed files with 3 additions and 6 deletions

View File

@@ -47,7 +47,7 @@ struct Operation;
/** A Shared State Process Variable (PV)
*
* "Shared" in the sense that all clients/subscribers interact with the
* same PVStructure.
* same PVStructure (excluding the RPC operation).
*
* @warning For the purposes of locking, this class is an Operation (see @ref provider_roles_requester_locking).
* eg. no locks may be held when calling post(), open(), close(), or connect().
@@ -62,7 +62,7 @@ struct Operation;
* Calling close() will close all currently opened client channels.
*
* Client channels, and operations on them, may be initiated at any time (via connect()).
* However, operations will not be fully created until open() is called.
* However, operations other than RPC will not proceed until open() is called.
*
* @note A SharedPV does not have a name. Name(s) are associated with a SharedPV
* By a Provider (StaticProvider, DynamicProvider, or any epics::pvAccess::ChannelProvider).

View File

@@ -157,14 +157,11 @@ pva::ChannelRPC::shared_pointer SharedChannel::createChannelRPC(
pvd::PVStructure::shared_pointer const & pvRequest)
{
std::tr1::shared_ptr<SharedRPC> ret(new SharedRPC(shared_from_this(), requester, pvRequest));
bool opened;
{
Guard G(owner->mutex);
owner->rpcs.push_back(ret.get());
opened = !!owner->type;
}
if(opened)
requester->channelRPCConnect(pvd::Status(), ret);
requester->channelRPCConnect(pvd::Status(), ret);
return ret;
}