fixed version reporting (shows module version) now; fixed system configuration and startPVAServer user specified provider name(s)

This commit is contained in:
Matej Sekoranja
2013-09-02 23:17:52 +02:00
parent 5fdfaa21d0
commit 1dbf736ad2
5 changed files with 57 additions and 8 deletions
+37 -1
View File
@@ -651,6 +651,11 @@ void ServerChannelGetRequesterImpl::getDone(const Status& status)
void ServerChannelGetRequesterImpl::destroy()
{
// keep a reference to ourselves as the owner
// could release its reference and we don't want to be
// destroyed prematurely
shared_pointer self(shared_from_this());
{
Lock guard(_mutex);
_channel->unregisterRequest(_ioid);
@@ -874,6 +879,11 @@ void ServerChannelPutRequesterImpl::unlock()
void ServerChannelPutRequesterImpl::destroy()
{
// keep a reference to ourselves as the owner
// could release its reference and we don't want to be
// destroyed prematurely
shared_pointer self(shared_from_this());
{
Lock guard(_mutex);
_channel->unregisterRequest(_ioid);
@@ -1097,6 +1107,11 @@ void ServerChannelPutGetRequesterImpl::unlock()
void ServerChannelPutGetRequesterImpl::destroy()
{
// keep a reference to ourselves as the owner
// could release its reference and we don't want to be
// destroyed prematurely
shared_pointer self(shared_from_this());
{
Lock guard(_mutex);
_channel->unregisterRequest(_ioid);
@@ -1317,6 +1332,11 @@ void ServerMonitorRequesterImpl::unlock()
void ServerMonitorRequesterImpl::destroy()
{
// keep a reference to ourselves as the owner
// could release its reference and we don't want to be
// destroyed prematurely
shared_pointer self(shared_from_this());
{
Lock guard(_mutex);
_channel->unregisterRequest(_ioid);
@@ -1550,6 +1570,11 @@ void ServerChannelArrayRequesterImpl::unlock()
void ServerChannelArrayRequesterImpl::destroy()
{
// keep a reference to ourselves as the owner
// could release its reference and we don't want to be
// destroyed prematurely
shared_pointer self(shared_from_this());
{
Lock guard(_mutex);
_channel->unregisterRequest(_ioid);
@@ -1766,6 +1791,11 @@ void ServerChannelProcessRequesterImpl::unlock()
void ServerChannelProcessRequesterImpl::destroy()
{
// keep a reference to ourselves as the owner
// could release its reference and we don't want to be
// destroyed prematurely
shared_pointer self(shared_from_this());
{
Lock guard(_mutex);
_channel->unregisterRequest(_ioid);
@@ -1880,7 +1910,8 @@ void ServerGetFieldRequesterImpl::send(ByteBuffer* buffer, TransportSendControl*
{
Lock guard(_mutex);
_status.serialize(buffer, control);
control->cachedSerialize(_field, buffer);
if (_status.isSuccess())
control->cachedSerialize(_field, buffer);
}
}
@@ -2009,6 +2040,11 @@ void ServerChannelRPCRequesterImpl::unlock()
void ServerChannelRPCRequesterImpl::destroy()
{
// keep a reference to ourselves as the owner
// could release its reference and we don't want to be
// destroyed prematurely
shared_pointer self(shared_from_this());
{
Lock guard(_mutex);
_channel->unregisterRequest(_ioid);
+4 -3
View File
@@ -18,7 +18,8 @@ using std::tr1::static_pointer_cast;
namespace epics { namespace pvAccess {
const char* ServerContextImpl::StateNames[] = { "NOT_INITIALIZED", "INITIALIZED", "RUNNING", "SHUTDOWN", "DESTROYED"};
const Version ServerContextImpl::VERSION("pvAccess Server", "cpp", 4, 3, 0, false);
const Version ServerContextImpl::VERSION("pvAccess Server", "cpp",
EPICS_PVA_MAJOR_VERSION, EPICS_PVA_MINOR_VERSION, EPICS_PVA_MAINTENANCE_VERSION, EPICS_PVA_DEVELOPMENT_FLAG);
ServerContextImpl::ServerContextImpl():
_state(NOT_INITIALIZED),
@@ -616,9 +617,9 @@ ServerContext::shared_pointer startPVAServer(String const & providerNames, int t
ServerContextImpl::shared_pointer ctx = ServerContextImpl::create();
// do not override configuration
if (providerNames == PVACCESS_ALL_PROVIDERS && !ctx->isChannelProviderNamePreconfigured())
if (!ctx->isChannelProviderNamePreconfigured())
ctx->setChannelProviderName(providerNames);
ChannelAccess::shared_pointer channelAccess = getChannelAccess();
ctx->initialize(channelAccess);