From 23c2ed3484a2c5cf531c5f48a88032cca205ee2a Mon Sep 17 00:00:00 2001 From: Michael Davidsaver Date: Tue, 27 Feb 2018 17:35:16 -0800 Subject: [PATCH] spamme respond to all spam match the prefix "spam" to allow clients to subscribe eg. "spam1" and "spam2" to test concurrent streaming and load balancing. --- examples/spamme.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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__<<" "<