pva/server.h allow createChannel() to return NULL

This commit is contained in:
Michael Davidsaver
2019-02-06 21:00:39 -08:00
parent 31d98fc965
commit d52d8cf5d4
2 changed files with 3 additions and 1 deletions

View File

@@ -242,6 +242,8 @@ struct DynamicProvider::Impl : public pva::ChannelProvider
pvd::Status sts;
ret = handler->createChannel(ChannelProvider::shared_pointer(internal_self), name, requester);
if(!ret)
sts = pvd::Status::error("Channel no longer available"); // because we only get here if channelFind() succeeds
requester->channelCreated(sts, ret);
return ret;

View File

@@ -183,7 +183,7 @@ void ServerContextImpl::loadConfiguration()
}
if(_channelProviders.empty())
LOG(logLevelError, "ServerContext configured with not Providers will do nothing!\n");
LOG(logLevelError, "ServerContext configured with no Providers will do nothing!\n");
//
// introspect network interfaces