diff --git a/examples/spamme.cpp b/examples/spamme.cpp index 6c37e2e..d66942b 100644 --- a/examples/spamme.cpp +++ b/examples/spamme.cpp @@ -247,9 +247,9 @@ struct SpamProvider : public pva::ChannelProvider, virtual pva::ChannelFind::shared_pointer channelFind(std::string const & name, pva::ChannelFindRequester::shared_pointer const & requester) OVERRIDE FINAL { - std::cerr<<"XXX "<channelName) { + if(name.size()>=this->channelName.size() && strncmp(name.c_str(), this->channelName.c_str(), this->channelName.size())==0) { ret = shared_from_this(); } std::cout<<__FUNCTION__<<" "< ret; - if(name==channelName) { + if(name.size()>=this->channelName.size() && strncmp(name.c_str(), this->channelName.c_str(), this->channelName.size())==0) { ret.reset(new SpamChannel(shared_from_this(), channelName, requester)); } std::cout<<__FUNCTION__<<" "<