From 03bb8408406f83a3f4af614d8aaaf5d7d7cca17f Mon Sep 17 00:00:00 2001 From: Matej Sekoranja Date: Wed, 19 Jun 2013 23:31:42 +0200 Subject: [PATCH] vxWorks: non-virtual destructor warning fixed --- pvAccessApp/rpcService/rpcServer.cpp | 16 ++-------------- pvAccessApp/rpcService/rpcService.h | 4 +++- 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/pvAccessApp/rpcService/rpcServer.cpp b/pvAccessApp/rpcService/rpcServer.cpp index 58eaba7..cd5f2f8 100644 --- a/pvAccessApp/rpcService/rpcServer.cpp +++ b/pvAccessApp/rpcService/rpcServer.cpp @@ -7,18 +7,6 @@ #include #include -#ifdef __vxworks -#include -using std::string; -inline int setenv(const char *name, const char *value, int overwrite) -{ - string e(name); - e += "="; - e += value; - return putenv(const_cast(e.c_str())); -} -#endif - using namespace epics::pvData; @@ -446,9 +434,9 @@ RPCServer::RPCServer() m_channelProviderImpl = m_channelProviderFactory->sharedInstance(); - setenv("EPICS_PVAS_PROVIDER_NAMES", m_channelProviderImpl->getProviderName().c_str(), 1); m_serverContext = ServerContextImpl::create(); - + m_serverContext->setChannelProviderName(m_channelProviderImpl->getProviderName()); + m_serverContext->initialize(getChannelAccess()); } diff --git a/pvAccessApp/rpcService/rpcService.h b/pvAccessApp/rpcService/rpcService.h index 88a38ee..06a9b72 100644 --- a/pvAccessApp/rpcService/rpcService.h +++ b/pvAccessApp/rpcService/rpcService.h @@ -34,7 +34,9 @@ private: class RPCService { public: POINTER_DEFINITIONS(RPCService); - + + virtual ~RPCService() {}; + virtual epics::pvData::PVStructure::shared_pointer request( epics::pvData::PVStructure::shared_pointer const & args ) throw (RPCRequestException) = 0;