Revision: 183
Author:
fu...@asguardnetworks.com
Date: Tue May 28 13:50:58 2013
Log: refactored code to use pointers to Subscriptions and MapClients
http://code.google.com/p/omapd/source/detail?r=183
Modified:
/branches/lfu/clienthandler.cpp
/branches/lfu/mapclient.cpp
/branches/lfu/mapclient.h
/branches/lfu/mapsessions.cpp
/branches/lfu/mapsessions.h
=======================================
--- /branches/lfu/clienthandler.cpp Fri May 24 23:06:39 2013
+++ /branches/lfu/clienthandler.cpp Tue May 28 13:50:58 2013
@@ -990,37 +990,31 @@
SubscribeOperation subOper = subOperIt.next();
if (subOper.subscribeType() == SubscribeOperation::Update) {
- Subscription sub(subReq.requestVersion());
- sub._name = subOper.name();
- sub._search = subOper.search();
+ Subscription* sub = new Subscription(subReq.requestVersion());
+ sub->_name = subOper.name();
+ sub->_search = subOper.search();
int currentDepth = -1;
- buildSearchGraph(sub, sub._search.startId(), currentDepth);
+ buildSearchGraph(*sub, sub->_search.startId(), currentDepth);
if
(_omapdConfig->valueFor("debug_level").value<OmapdConfig::IfmapDebugOptions>().testFlag(OmapdConfig::ShowSearchAlgorithm))
{
qDebug() << __PRETTY_FUNCTION__ << ":" << "Subscription:" <<
subOper.name();
- qDebug() << __PRETTY_FUNCTION__ << ":" << " idList size:" <<
sub._ids.size();
- qDebug() << __PRETTY_FUNCTION__ << ":" << " linkList size:" <<
sub._linkList.size();
+ qDebug() << __PRETTY_FUNCTION__ << ":" << " idList size:" <<
sub->_ids.size();
+ qDebug() << __PRETTY_FUNCTION__ << ":" << " linkList size:" <<
sub->_linkList.size();
}
// LFu:
// instead of changing a local copy of the subs list and then writing it
back,
// change the list in place?
- QList<Subscription>& subList =
_mapSessions->subscriptionListForClient(_authToken);
- if (subList.isEmpty()) {
- subList << sub;
- } else {
- // Replace any existing subscriptions with the same name with removeOne
- subList.removeOne(sub);
- subList << sub;
- }
+ _mapSessions->insertSubscriptionForClient(sub, _authToken);
+
if
(_omapdConfig->valueFor("debug_level").value<OmapdConfig::IfmapDebugOptions>().testFlag(OmapdConfig::ShowClientOps))
{
- qDebug() << __PRETTY_FUNCTION__ << ":" << "subList size:" <<
subList.size();
+ qDebug() << __PRETTY_FUNCTION__ << ":" << "subList size:" <<
_mapSessions->subscriptionListForClient(_authToken).size();
}
// LFu: this is no longer necessary:
// _mapSessions->setSubscriptionListForClient(_authToken, subList);
if
(_omapdConfig->valueFor("debug_level").value<OmapdConfig::IfmapDebugOptions>().testFlag(OmapdConfig::ShowClientOps))
{
- qDebug() << __PRETTY_FUNCTION__ << ":" << "Adding SearchGraph to
subscription lists with name:" << sub._name;
+ qDebug() << __PRETTY_FUNCTION__ << ":" << "Adding SearchGraph to
subscription lists with name:" << sub->_name;
}
if (_mapSessions->haveActivePollForClient(_authToken)) {
@@ -1029,23 +1023,30 @@
}
} else if (subOper.subscribeType() == SubscribeOperation::Delete) {
- Subscription delSub(subReq.requestVersion());
- delSub._name = subOper.name();
- // LFu: change subscription list in-place
- QList<Subscription>& subList =
_mapSessions->subscriptionListForClient(_authToken);
- // _mapSessions->removeSubscriptionListForClient(_authToken);
- if (! subList.isEmpty()) {
- // remove delSub from list with same name
- subList.removeOne(delSub);
- if
(_omapdConfig->valueFor("debug_level").value<OmapdConfig::IfmapDebugOptions>().testFlag(OmapdConfig::ShowClientOps))
{
- qDebug() << __PRETTY_FUNCTION__ << ":" << "Removing subscription from
subList with name:" << delSub._name;
- }
- } else {
- if
(_omapdConfig->valueFor("debug_level").value<OmapdConfig::IfmapDebugOptions>().testFlag(OmapdConfig::ShowClientOps))
{
- qDebug() << __PRETTY_FUNCTION__ << ":" << "No subscriptions to delete for
publisher:" << publisherId;
- }
+ if
(_omapdConfig->valueFor("debug_level").value<OmapdConfig::IfmapDebugOptions>().testFlag(OmapdConfig::ShowClientOps))
{
+ qDebug() << __PRETTY_FUNCTION__ << ":" << "Removing subscription from
subList with name:" << subOper.name();
}
+
+ _mapSessions->removeSubscriptionForClient(subOper.name(), _authToken);
+
+// Subscription delSub(subReq.requestVersion());
+// delSub._name = subOper.name();
+
+// // LFu: change subscription list in-place
+// QList<Subscription>& subList =
_mapSessions->subscriptionListForClient(_authToken);
+// // _mapSessions->removeSubscriptionListForClient(_authToken);
+// if (! subList.isEmpty()) {
+// // remove delSub from list with same name
+// subList.removeOne(delSub);
+// if
(_omapdConfig->valueFor("debug_level").value<OmapdConfig::IfmapDebugOptions>().testFlag(OmapdConfig::ShowClientOps))
{
+// qDebug() << __PRETTY_FUNCTION__ << ":" << "Removing subscription from
subList with name:" << delSub._name;
+// }
+// } else {
+// if
(_omapdConfig->valueFor("debug_level").value<OmapdConfig::IfmapDebugOptions>().testFlag(OmapdConfig::ShowClientOps))
{
+// qDebug() << __PRETTY_FUNCTION__ << ":" << "No subscriptions to delete
for publisher:" << publisherId;
+// }
+// }
// (LFu) no longer need to save back list
// if (! subList.isEmpty()) {
@@ -1053,7 +1054,7 @@
// }
if
(_omapdConfig->valueFor("debug_level").value<OmapdConfig::IfmapDebugOptions>().testFlag(OmapdConfig::ShowClientOps))
{
- qDebug() << __PRETTY_FUNCTION__ << ":" << "subList size:" <<
subList.size();
+ qDebug() << __PRETTY_FUNCTION__ << ":" << "subList size:" <<
_mapSessions->subscriptionListForClient(_authToken).size();
}
}
@@ -1699,22 +1700,24 @@
// new link could link two separate sub-graphs together or a deleted link
// could prune a graph into two separate sub-graphs.
- QHashIterator<QString,QList<Subscription> >
allSubsIt(_mapSessions->subscriptionLists());
+ QHash<QString, QList<Subscription*> >
allSubLists(_mapSessions->subscriptionLists());
+ QMutableHashIterator<QString,QList<Subscription*> >
allSubsIt(allSubLists);
+
while (allSubsIt.hasNext()) {
allSubsIt.next();
const QString& authToken = allSubsIt.key();
QString pubId = _mapSessions->pubIdForAuthToken(authToken);
- QList<Subscription> subList = allSubsIt.value();
+ QList<Subscription*>& subList = allSubsIt.value();
if
(_omapdConfig->valueFor("debug_level").value<OmapdConfig::IfmapDebugOptions>().testFlag(OmapdConfig::ShowSearchAlgorithm))
{
qDebug() << __PRETTY_FUNCTION__ << ":" << "publisher:" << pubId << "has
num subscriptions:" << subList.size();
}
- bool publisherHasDirtySub = false;
- QMutableListIterator<Subscription> subIt(subList);
+ // bool publisherHasDirtySub = false;
+ QMutableListIterator<Subscription*> subIt(subList);
while (subIt.hasNext()) {
- Subscription sub = subIt.next();
+ Subscription* sub = subIt.next();
if
(_omapdConfig->valueFor("debug_level").value<OmapdConfig::IfmapDebugOptions>().testFlag(OmapdConfig::ShowSearchAlgorithm))
{
- qDebug() << __PRETTY_FUNCTION__ << ":" << "--checking subscription
named:" << sub._name;
+ qDebug() << __PRETTY_FUNCTION__ << ":" << "--checking subscription
named:" << sub->_name;
}
QSet<Id> idsWithConnectedGraphUpdates, idsWithConnectedGraphDeletes;
@@ -1723,7 +1726,7 @@
bool subIsDirty = false;
if (! isLink) {
- if (sub._ids.contains(link.first)) {
+ if (sub->_ids.contains(link.first)) {
// Case 1.
subIsDirty = true;
if
(_omapdConfig->valueFor("debug_level").value<OmapdConfig::IfmapDebugOptions>().testFlag(OmapdConfig::ShowSearchAlgorithm))
{
@@ -1732,7 +1735,7 @@
}
} else {
- bool isLinkInSub = sub._linkList.contains(link);
+ bool isLinkInSub = sub->_linkList.contains(link);
if (isLinkInSub && publishType == Meta::PublishDelete) {
// Case 3.
@@ -1763,70 +1766,70 @@
// of max subs search depth can be removed in isolation (i.e. no subs
graph must be calculated)
// Case 4. (and search graph rebuild for case 3)
- QMap<Id, int> existingIdList = sub._ids;
- QSet<Link> existingLinkList = sub._linkList;
- sub._ids.clear();
- sub._linkList.clear();
+ QMap<Id, int> existingIdList = sub->_ids;
+ QSet<Link> existingLinkList = sub->_linkList;
+ sub->_ids.clear();
+ sub->_linkList.clear();
int currentDepth = -1;
// LFu - remove
QTime buildSearchGraphTimer;
buildSearchGraphTimer.start();
- buildSearchGraph(sub, sub._search.startId(), currentDepth);
+ buildSearchGraph(*sub, sub->_search.startId(), currentDepth);
// qDebug() << "~~processing buildSearchGraph() took " <<
buildSearchGraphTimer.elapsed() << " ms for sub " << sub._name;
- if (sub._ids != existingIdList) {
+ if (sub->_ids != existingIdList) {
subIsDirty = true;
modifiedSearchGraph = true;
// Metadata on these ids are in updateResults
- idsWithConnectedGraphUpdates = sub.identifiersWithout(existingIdList);
+ idsWithConnectedGraphUpdates = sub->identifiersWithout(existingIdList);
// was:
// idsWithConnectedGraphUpdates = sub._idList - existingIdList;
// Metadata on these ids are in deleteResults
- idsWithConnectedGraphDeletes = sub.subtractFrom(existingIdList);
+ idsWithConnectedGraphDeletes = sub->subtractFrom(existingIdList);
// was:
// idsWithConnectedGraphDeletes = existingIdList - sub._idList;
if
(_omapdConfig->valueFor("debug_level").value<OmapdConfig::IfmapDebugOptions>().testFlag(OmapdConfig::ShowSearchAlgorithm))
{
- qDebug() << __PRETTY_FUNCTION__ << ":sub._linkList.contains(link) && "
<< "----subscription is dirty with newIdList.size:" << sub._ids.size();
+ qDebug() << __PRETTY_FUNCTION__ << ":sub._linkList.contains(link) && "
<< "----subscription is dirty with newIdList.size:" << sub->_ids.size();
}
}
- if (sub._linkList != existingLinkList) {
+ if (sub->_linkList != existingLinkList) {
subIsDirty = true;
modifiedSearchGraph = true;
// Metadata on these links are in updateResults
- linksWithConnectedGraphUpdates = sub._linkList - existingLinkList;
+ linksWithConnectedGraphUpdates = sub->_linkList - existingLinkList;
// Metadata on these links are in deleteResults
- linksWithConnectedGraphDeletes = existingLinkList - sub._linkList;
+ linksWithConnectedGraphDeletes = existingLinkList - sub->_linkList;
if
(_omapdConfig->valueFor("debug_level").value<OmapdConfig::IfmapDebugOptions>().testFlag(OmapdConfig::ShowSearchAlgorithm))
{
- qDebug() << __PRETTY_FUNCTION__ << ":" << "----subscription is dirty with
newLinkList.size:" << sub._linkList.size();
+ qDebug() << __PRETTY_FUNCTION__ << ":" << "----subscription is dirty with
newLinkList.size:" << sub->_linkList.size();
}
}
}
}
- if (subIsDirty && !sub._subscriptionError) {
+ if (subIsDirty && !sub->_subscriptionError) {
// Construct results for the subscription
- if (sub._requestVersion == MapRequest::IFMAPv11) {
+ if (sub->_requestVersion == MapRequest::IFMAPv11) {
// Trigger to build and send pollResults
- sub._sentFirstResult = false;
- } else if (sub._sentFirstResult && sub._requestVersion ==
MapRequest::IFMAPv20) {
+ sub->_sentFirstResult = false;
+ } else if (sub->_sentFirstResult && sub->_requestVersion ==
MapRequest::IFMAPv20) {
MapRequest::RequestError error = MapRequest::ErrorNone;
- // Add results from publish/delete/endSession/purgePublisher (that don't
modify SearchGraph)
+ // Add results from
publish/delete/endSessipublisherHasDirtySubon/purgePublisher (that don't
modify SearchGraph)
if (!modifiedSearchGraph || publishType == Meta::PublishDelete) {
SearchResult::ResultType resultType =
SearchResult::resultTypeForPublishType(publishType);
if
(_omapdConfig->valueFor("debug_level").value<OmapdConfig::IfmapDebugOptions>().testFlag(OmapdConfig::ShowSearchAlgorithm))
{
qDebug() << __PRETTY_FUNCTION__ << ":" << "----adding update/delete
results from un-changed SearchGraph";
}
if (isLink) {
- addLinkResult(sub, link, metaChanges, resultType, error);
+ addLinkResult(*sub, link, metaChanges, resultType, error);
} else {
- addIdentifierResult(sub, link.first, metaChanges, resultType, error);
+ addIdentifierResult(*sub, link.first, metaChanges, resultType, error);
}
}
// Add results from extending SearchGraph for this subscription
@@ -1834,24 +1837,27 @@
if
(_omapdConfig->valueFor("debug_level").value<OmapdConfig::IfmapDebugOptions>().testFlag(OmapdConfig::ShowSearchAlgorithm))
{
qDebug() << __PRETTY_FUNCTION__ << ":" << "----adding updateResults from
changed SearchGraph";
}
- addUpdateAndDeleteMetadata(sub, SearchResult::UpdateResultType,
idsWithConnectedGraphUpdates, linksWithConnectedGraphUpdates, error);
+ addUpdateAndDeleteMetadata(*sub, SearchResult::UpdateResultType,
idsWithConnectedGraphUpdates, linksWithConnectedGraphUpdates, error);
}
// Add results from pruning SearchGraph for this subscription
if (!idsWithConnectedGraphDeletes.isEmpty() |
| !linksWithConnectedGraphDeletes.isEmpty()) {
if
(_omapdConfig->valueFor("debug_level").value<OmapdConfig::IfmapDebugOptions>().testFlag(OmapdConfig::ShowSearchAlgorithm))
{
qDebug() << __PRETTY_FUNCTION__ << ":" << "----adding deleteResults from
changed SearchGraph";
}
- addUpdateAndDeleteMetadata(sub, SearchResult::DeleteResultType,
idsWithConnectedGraphDeletes, linksWithConnectedGraphDeletes, error);
+ addUpdateAndDeleteMetadata(*sub, SearchResult::DeleteResultType,
idsWithConnectedGraphDeletes, linksWithConnectedGraphDeletes, error);
}
}
- subIt.setValue(sub);
- publisherHasDirtySub = true;
+
+ // LFu: not needed any longer:
+ // subIt.setValue(sub);
+ // publisherHasDirtySub = true;
}
}
- if (publisherHasDirtySub) {
- _mapSessions->setSubscriptionListForClient(authToken, subList);
- }
+
+// if (publisherHasDirtySub) {
+// _mapSessions->setSubscriptionListForClient(authToken, subList);
+// }
}
}
@@ -1865,41 +1871,43 @@
// 2. metadata is publish-notify on a link in the SearchGraph
// 3. metadata is publish-notify on a link with one identifier in the
SearchGraph
- QHashIterator<QString,QList<Subscription> >
allSubsIt(_mapSessions->subscriptionLists());
+ QHash<QString, QList<Subscription*> >
allSubLists(_mapSessions->subscriptionLists());
+ QMutableHashIterator<QString,QList<Subscription*> >
allSubsIt(allSubLists);
+
while (allSubsIt.hasNext()) {
allSubsIt.next();
- QString authToken = allSubsIt.key();
+ const QString& authToken = allSubsIt.key();
QString pubId = _mapSessions->pubIdForAuthToken(authToken);
- QList<Subscription> subList = allSubsIt.value();
+ QList<Subscription*>& subList = allSubsIt.value();
if
(_omapdConfig->valueFor("debug_level").value<OmapdConfig::IfmapDebugOptions>().testFlag(OmapdConfig::ShowSearchAlgorithm))
{
qDebug() << __PRETTY_FUNCTION__ << ":" << "publisher:" << pubId << "has
num subscriptions:" << subList.size();
}
- bool publisherHasDirtySub = false;
- QMutableListIterator<Subscription> subIt(subList);
+ // bool publisherHasDirtySub = false;
+ QMutableListIterator<Subscription*> subIt(subList);
while (subIt.hasNext()) {
- Subscription sub = subIt.next();
+ Subscription* sub = subIt.next();
if
(_omapdConfig->valueFor("debug_level").value<OmapdConfig::IfmapDebugOptions>().testFlag(OmapdConfig::ShowSearchAlgorithm))
{
- qDebug() << __PRETTY_FUNCTION__ << ":" << "--checking subscription
named:" << sub._name;
+ qDebug() << __PRETTY_FUNCTION__ << ":" << "--checking subscription
named:" << sub->_name;
}
bool subIsDirty = false;
if (! isLink) {
// Case 1.
- if (sub._ids.contains(link.first)) {
+ if (sub->_ids.contains(link.first)) {
subIsDirty = true;
if
(_omapdConfig->valueFor("debug_level").value<OmapdConfig::IfmapDebugOptions>().testFlag(OmapdConfig::ShowSearchAlgorithm))
{
qDebug() << __PRETTY_FUNCTION__ << ":" << "----subscription is dirty with
id in SearchGraph:" << link.first;
}
}
} else {
- if (sub._linkList.contains(link)) {
+ if (sub->_linkList.contains(link)) {
// Case 2.
subIsDirty = true;
if
(_omapdConfig->valueFor("debug_level").value<OmapdConfig::IfmapDebugOptions>().testFlag(OmapdConfig::ShowSearchAlgorithm))
{
qDebug() << __PRETTY_FUNCTION__ << ":" << "----subscription is dirty with
link in SearchGraph:" << link;
}
- } else if (sub._ids.contains(link.first) ||
sub._ids.contains(link.second)) {
+ } else if (sub->_ids.contains(link.first) ||
sub->_ids.contains(link.second)) {
// Case 3.
subIsDirty = true;
if
(_omapdConfig->valueFor("debug_level").value<OmapdConfig::IfmapDebugOptions>().testFlag(OmapdConfig::ShowSearchAlgorithm))
{
@@ -1908,28 +1916,29 @@
}
}
- if (subIsDirty && !sub._subscriptionError) {
+ if (subIsDirty && !sub->_subscriptionError) {
// Construct results for the subscription
MapRequest::RequestError error = MapRequest::ErrorNone;
if (isLink) {
- addLinkResult(sub, link, notifyMetaList, SearchResult::NotifyResultType,
error);
+ addLinkResult(*sub, link, notifyMetaList, SearchResult::NotifyResultType,
error);
} else {
- addIdentifierResult(sub, link.first, notifyMetaList,
SearchResult::NotifyResultType, error);
+ addIdentifierResult(*sub, link.first, notifyMetaList,
SearchResult::NotifyResultType, error);
}
- if (sub._curSize > MAXPOLLRESULTSIZEDEFAULT) { // TODO: Replace with
client setting
- qDebug() << __PRETTY_FUNCTION__ << ":" << "Search results exceeded max
poll result size with curSize:" << sub._curSize;
- sub._subscriptionError = MapRequest::IfmapPollResultsTooBig;
+ if (sub->_curSize > MAXPOLLRESULTSIZEDEFAULT) { // TODO: Replace with
client setting
+ qDebug() << __PRETTY_FUNCTION__ << ":" << "Search results exceeded max
poll result size with curSize:" << sub->_curSize;
+ sub->_subscriptionError = MapRequest::IfmapPollResultsTooBig;
}
subIt.setValue(sub);
- publisherHasDirtySub = true;
+ // publisherHasDirtySub = true;
}
}
- if (publisherHasDirtySub) {
- _mapSessions->setSubscriptionListForClient(authToken, subList);
- }
+// no longer needed:
+// if (publisherHasDirtySub) {
+// _mapSessions->setSubscriptionListForClient(authToken, subList);
+// }
}
}
@@ -1938,14 +1947,15 @@
// TODO: Often this slot gets signaled from a method that really only
needs to
// send results on active polls for a specific publisherId. Could optimize
// this slot in those cases.
- QHashIterator<QString,QList<Subscription> >
allSubsIt(_mapSessions->subscriptionLists());
+ QHash<QString, QList<Subscription*> >
allSubLists(_mapSessions->subscriptionLists());
+ QMutableHashIterator<QString,QList<Subscription*> >
allSubsIt(allSubLists);
while (allSubsIt.hasNext()) {
allSubsIt.next();
- QString authToken = allSubsIt.key();
+ const QString& authToken = allSubsIt.key();
// Only check subscriptions for publisher if client has an active poll
if (_mapSessions->haveActivePollForClient(authToken)) {
QString pubId = _mapSessions->pubIdForAuthToken(authToken);
- QList<Subscription> subList = allSubsIt.value();
+ QList<Subscription*>& subList = allSubsIt.value();
if
(_omapdConfig->valueFor("debug_level").value<OmapdConfig::IfmapDebugOptions>().testFlag(OmapdConfig::ShowSearchAlgorithm))
{
qDebug() << __PRETTY_FUNCTION__ << ":" << "publisher:" << pubId << "has
num subscriptions:" << subList.size();
}
@@ -1954,47 +1964,47 @@
MapResponse *pollResponse = 0;
MapRequest::RequestVersion pollResponseVersion = MapRequest::VersionNone;
- QMutableListIterator<Subscription> subIt(subList);
+ QMutableListIterator<Subscription*> subIt(subList);
while (subIt.hasNext()) {
- Subscription sub = subIt.next();
+ Subscription* sub = subIt.next();
MapRequest::RequestError subError = MapRequest::ErrorNone;
if
(_omapdConfig->valueFor("debug_level").value<OmapdConfig::IfmapDebugOptions>().testFlag(OmapdConfig::ShowSearchAlgorithm))
{
- qDebug() << __PRETTY_FUNCTION__ << ":" << "--Checking subscription
named:" << sub._name;
+ qDebug() << __PRETTY_FUNCTION__ << ":" << "--Checking subscription
named:" << sub->_name;
}
if (pollResponseVersion == MapRequest::VersionNone) {
- pollResponseVersion = sub._requestVersion;
+ pollResponseVersion = sub->_requestVersion;
}
- if (sub._subscriptionError) {
+ if (sub->_subscriptionError) {
if (!pollResponse) {
pollResponse = new MapResponse(pollResponseVersion);
pollResponse->startPollResponse(_mapSessions->sessIdForClient(authToken));
}
- pollResponse->addPollErrorResult(sub._name, sub._subscriptionError);
+ pollResponse->addPollErrorResult(sub->_name, sub->_subscriptionError);
- sub.clearSearchResults();
- subIt.setValue(sub);
+ sub->clearSearchResults();
+ // subIt.setValue(sub);
publisherHasError = true;
- } else if (!sub._sentFirstResult) {
+ } else if (!sub->_sentFirstResult) {
// Build results from entire search graph for the first poll response
- collectSearchGraphMetadata(sub, SearchResult::SearchResultType, subError);
+ collectSearchGraphMetadata(*sub, SearchResult::SearchResultType,
subError);
if (subError) {
- qDebug() << __PRETTY_FUNCTION__ << ":" << "Search results exceeded
max-size with curSize:" << sub._curSize;
- sub._subscriptionError = subError;
- sub.clearSearchResults();
+ qDebug() << __PRETTY_FUNCTION__ << ":" << "Search results exceeded
max-size with curSize:" << sub->_curSize;
+ sub->_subscriptionError = subError;
+ sub->clearSearchResults();
publisherHasError = true;
if (!pollResponse) {
pollResponse = new MapResponse(pollResponseVersion);
pollResponse->startPollResponse(_mapSessions->sessIdForClient(authToken));
}
- pollResponse->addPollErrorResult(sub._name, sub._subscriptionError);
- subIt.setValue(sub);
- } else if (sub._searchResults.count() > 0) {
+ pollResponse->addPollErrorResult(sub->_name, sub->_subscriptionError);
+ // subIt.setValue(sub);
+ } else if (sub->_searchResults.count() > 0) {
if
(_omapdConfig->valueFor("debug_level").value<OmapdConfig::IfmapDebugOptions>().testFlag(OmapdConfig::ShowClientOps))
{
qDebug() << __PRETTY_FUNCTION__ << ":" << "--Gathering initial poll
results for publisher with active poll:" << pubId;
}
@@ -2003,31 +2013,31 @@
pollResponse = new MapResponse(pollResponseVersion);
pollResponse->startPollResponse(_mapSessions->sessIdForClient(authToken));
}
- pollResponse->addPollResults(sub._searchResults, sub._name);
- sub.clearSearchResults();
+ pollResponse->addPollResults(sub->_searchResults, sub->_name);
+ sub->clearSearchResults();
- sub._sentFirstResult = true;
- subIt.setValue(sub);
- } else if (sub._curSize > MAXPOLLRESULTSIZEDEFAULT &&
- sub._requestVersion == MapRequest::IFMAPv20) { // TODO: Replace with
client setting
- qDebug() << __PRETTY_FUNCTION__ << ":" << "Search results exceeded max
poll result size with curSize:" << sub._curSize;
- sub._subscriptionError = MapRequest::IfmapPollResultsTooBig;
- sub.clearSearchResults();
+ sub->_sentFirstResult = true;
+ // subIt.setValue(sub);
+ } else if (sub->_curSize > MAXPOLLRESULTSIZEDEFAULT &&
+ sub->_requestVersion == MapRequest::IFMAPv20) { // TODO: Replace with
client setting
+ qDebug() << __PRETTY_FUNCTION__ << ":" << "Search results exceeded max
poll result size with curSize:" << sub->_curSize;
+ sub->_subscriptionError = MapRequest::IfmapPollResultsTooBig;
+ sub->clearSearchResults();
publisherHasError = true;
if (!pollResponse) {
pollResponse = new MapResponse(pollResponseVersion);
pollResponse->startPollResponse(_mapSessions->sessIdForClient(authToken));
}
- pollResponse->addPollErrorResult(sub._name, sub._subscriptionError);
- subIt.setValue(sub);
+ pollResponse->addPollErrorResult(sub->_name, sub->_subscriptionError);
+ // subIt.setValue(sub);
} else {
if
(_omapdConfig->valueFor("debug_level").value<OmapdConfig::IfmapDebugOptions>().testFlag(OmapdConfig::ShowSearchAlgorithm))
{
qDebug() << __PRETTY_FUNCTION__ << ":" << "--No results for subscription
at this time";
qDebug() << __PRETTY_FUNCTION__ << ":"
<< "----haveActivePollForClient(authToken):" <<
_mapSessions->haveActivePollForClient(authToken);
}
}
- } else if (sub._deltaResults.count() > 0) {
+ } else if (sub->_deltaResults.count() > 0) {
// Build results from update/delete/notify results
if
(_omapdConfig->valueFor("debug_level").value<OmapdConfig::IfmapDebugOptions>().testFlag(OmapdConfig::ShowClientOps))
{
qDebug() << __PRETTY_FUNCTION__ << ":" << "--Gathering delta poll results
for publisher with active poll:" << pubId;
@@ -2037,10 +2047,10 @@
pollResponse = new MapResponse(pollResponseVersion);
pollResponse->startPollResponse(_mapSessions->sessIdForClient(authToken));
}
- pollResponse->addPollResults(sub._deltaResults, sub._name);
+ pollResponse->addPollResults(sub->_deltaResults, sub->_name);
- sub.clearSearchResults();
- subIt.setValue(sub);
+ sub->clearSearchResults();
+ // subIt.setValue(sub);
}
}
@@ -2051,7 +2061,8 @@
emit
needToSendPollResponse(_mapSessions->pollConnectionForClient(authToken),
pollResponse->responseData(), pollResponse->requestVersion());
delete pollResponse;
// Update subscription list for this publisher
- _mapSessions->setSubscriptionListForClient(authToken, subList);
+ // (LFu) no longer needed
+ //_mapSessions->setSubscriptionListForClient(authToken, subList);
_mapSessions->removeActivePollForClient(authToken);
}
=======================================
--- /branches/lfu/mapclient.cpp Fri May 24 23:06:39 2013
+++ /branches/lfu/mapclient.cpp Tue May 28 13:50:58 2013
@@ -41,3 +41,56 @@
_pubId = pubId;
_metadataPolicy = metadataPolicy;
}
+
+MapClient::~MapClient()
+{
+ clearSubscriptionList();
+}
+
+void MapClient::clearSubscriptionList()
+{
+ QListIterator<Subscription*> it(_subscriptionList);
+ while(it.hasNext())
+ {
+ delete it.next();
+ }
+ _subscriptionList.clear();
+}
+
+void MapClient::insertSubscription(Subscription* sub)
+{
+ // we need to check if a subscription with this name
+ // exists already and replace it with the new one if found
+ QMutableListIterator<Subscription*> it(_subscriptionList);
+ while(it.hasNext())
+ {
+ Subscription* s = it.next();
+ if(*s == *sub)
+ {
+ delete s;
+ it.setValue(sub);
+ return;
+ }
+ }
+
+ // otherwise just add the new one:
+ _subscriptionList << sub;
+
+}
+
+void MapClient::removeSubscription(const QString& name)
+{
+ // we need to check if a subscription with this name
+ // exists already and replace it with the new one if found
+ QMutableListIterator<Subscription*> it(_subscriptionList);
+ while(it.hasNext())
+ {
+ Subscription* s = it.next();
+ if(s->_name == name)
+ {
+ delete s;
+ it.remove();
+ return;
+ }
+ }
+}
=======================================
--- /branches/lfu/mapclient.h Fri May 24 23:06:39 2013
+++ /branches/lfu/mapclient.h Tue May 28 13:50:58 2013
@@ -38,6 +38,8 @@
const QString& pubId,
const QString& metadataPolicy);
+ ~MapClient();
+
const QString& pubId() const { return _pubId; }
const QString& authToken() const { return _authToken; }
MapRequest::AuthenticationType authType() const { return _authType; }
@@ -48,16 +50,19 @@
bool hasActiveSSRC() const { return _hasActiveSSRC; }
bool hasActiveARC() const { return _hasActiveARC; }
bool hasActivePoll() const { return _hasActivePoll; }
- const QList<Subscription>& subscriptionList() const { return
_subscriptionList; }
- QList<Subscription>& subscriptionList() { return _subscriptionList; }
+ const QList<Subscription*>& subscriptionList() const { return
_subscriptionList; }
+ QList<Subscription*>& subscriptionList() { return _subscriptionList; }
void setSessId(const QString& sessId) { _sessId = sessId; }
void clearSessId() { _sessId.clear(); }
void setHasActiveSSRC(bool hasActiveSSRC) { _hasActiveSSRC =
hasActiveSSRC; }
void setHasActiveARC(bool hasActiveARC) { _hasActiveARC = hasActiveARC; }
void setHasActivePoll(bool hasActivePoll) { _hasActivePoll =
hasActivePoll; }
- void setSubscriptionList(const QList<Subscription>& subList) {
_subscriptionList = subList; }
- void emptySubscriptionList() { _subscriptionList.clear(); }
+
+ // void setSubscriptionList(const QList<Subscription>& subList) {
_subscriptionList = subList; }
+ void insertSubscription(Subscription* sub);
+ void removeSubscription(const QString& name);
+ void clearSubscriptionList();
private:
QString _pubId;
@@ -70,7 +75,7 @@
bool _hasActiveSSRC;
bool _hasActiveARC;
bool _hasActivePoll;
- QList<Subscription> _subscriptionList;
+ QList<Subscription*> _subscriptionList;
};
#endif // MAPCLIENT_H
=======================================
--- /branches/lfu/mapsessions.cpp Fri May 24 23:06:39 2013
+++ /branches/lfu/mapsessions.cpp Tue May 28 13:50:58 2013
@@ -141,7 +141,7 @@
if (clientConfigOk) {
if (client->authType() == MapRequest::AuthCACert) {
- MapClient mapClient(authToken, client->authType(), client->authz(), "",
client->metadataPolicy());
+ MapClient* mapClient = new MapClient(authToken, client->authType(),
client->authz(), "", client->metadataPolicy());
_mapClientCAs.insert(authToken, mapClient);
if
(_omapdConfig->valueFor("debug_level").value<OmapdConfig::IfmapDebugOptions>().testFlag(OmapdConfig::ShowClientOps))
{
qDebug() << __PRETTY_FUNCTION__ << ":" << "Created CA Authentication
MapClient for configuration named:" << client->name()
@@ -153,13 +153,13 @@
QString pubId;
if (_mapClients.contains(authToken)) {
// Don't create new publisher-id if replacing client config
- pubId = _mapClients.value(authToken).pubId();
+ pubId = _mapClients.value(authToken)->pubId();
} else {
// Create a new publisher-id for this client
pubId.setNum(_pubIdIndex++);
}
- MapClient mapClient(authToken, client->authType(), client->authz(),
pubId, client->metadataPolicy());
+ MapClient* mapClient = new MapClient(authToken, client->authType(),
client->authz(), pubId, client->metadataPolicy());
_mapClients.insert(authToken, mapClient);
if
(_omapdConfig->valueFor("debug_level").value<OmapdConfig::IfmapDebugOptions>().testFlag(OmapdConfig::ShowClientOps))
{
qDebug() << __PRETTY_FUNCTION__ << ":" << "Created MapClient for client
configuration named:" << client->name()
@@ -220,12 +220,12 @@
if (clientConfigOk) {
if (client->authType() == MapRequest::AuthCACert) {
- _mapClientCAs.remove(authToken);
+ removeMapClientCA(authToken);
if
(_omapdConfig->valueFor("debug_level").value<OmapdConfig::IfmapDebugOptions>().testFlag(OmapdConfig::ShowClientOps))
{
qDebug() << __PRETTY_FUNCTION__ << ":" << "Removed CA Authentication
MapClient with authToken" << authToken;
}
} else {
- _mapClients.remove(authToken);
+ removeMapClient(authToken);
if
(_omapdConfig->valueFor("debug_level").value<OmapdConfig::IfmapDebugOptions>().testFlag(OmapdConfig::ShowClientOps))
{
qDebug() << __PRETTY_FUNCTION__ << ":" << "Removed MapClient with
authToken" << authToken;
}
@@ -258,8 +258,8 @@
_activePollConnections.remove(authToken);
if (_mapClients.contains(authToken)) {
- _mapClients[authToken].setHasActiveARC(false);
- _mapClients[authToken].setHasActivePoll(false);
+ _mapClients[authToken]->setHasActiveARC(false);
+ _mapClients[authToken]->setHasActivePoll(false);
}
}
}
@@ -272,7 +272,7 @@
if (authType != MapRequest::AuthNone && !authToken.isEmpty()) {
if (_mapClients.contains(authToken)) {
// Already have a publisher-id for this client
- pubId = _mapClients.value(authToken).pubId();
+ pubId = _mapClients[authToken]->pubId();
if
(_omapdConfig->valueFor("debug_level").value<OmapdConfig::IfmapDebugOptions>().testFlag(OmapdConfig::ShowClientOps))
{
qDebug() << __PRETTY_FUNCTION__ << ":" << "Already have client
configuration with pub-id:" << pubId;
}
@@ -284,9 +284,9 @@
// Create a new publisher-id for this client
pubId.setNum(_pubIdIndex++);
// Set the client authorization as determined by CA Cert setting
- OmapdConfig::AuthzOptions authz =
_mapClientCAs.value(compToken.last()).authz();
- QString metadataPolicy =
_mapClientCAs.value(compToken.last()).metadataPolicy();
- MapClient client(authToken, authType, authz, pubId, metadataPolicy);
+ OmapdConfig::AuthzOptions authz =
_mapClientCAs[compToken.last()]->authz();
+ QString metadataPolicy =
_mapClientCAs[compToken.last()]->metadataPolicy();
+ MapClient* client = new MapClient(authToken, authType, authz, pubId,
metadataPolicy);
_mapClients.insert(authToken, client);
registered = true;
@@ -299,7 +299,7 @@
pubId.setNum(_pubIdIndex++);
OmapdConfig::AuthzOptions authz =
_omapdConfig->valueFor("default_authorization").value<OmapdConfig::AuthzOptions>();
// TODO: Allow application of metadataPolicy to clients created this way
- MapClient client(authToken, authType, authz, pubId, "");
+ MapClient* client = new MapClient(authToken, authType, authz, pubId, "");
_mapClients.insert(authToken, client);
registered = true;
@@ -321,6 +321,25 @@
return pubId;
}
+
+void MapSessions::removeMapClient(const QString& authToken)
+{
+ if(_mapClients.contains(authToken))
+ {
+ delete _mapClients[authToken];
+ _mapClients.remove(authToken);
+ }
+}
+
+void MapSessions::removeMapClientCA(const QString& authToken)
+{
+ if(_mapClientCAs.contains(authToken))
+ {
+ delete _mapClientCAs[authToken];
+ _mapClientCAs.remove(authToken);
+ }
+}
+
bool MapSessions::haveActiveSSRCForClient(const QString& authToken)
{
@@ -329,7 +348,7 @@
if (_mapClients.contains(authToken)) {
// LFu: access hash element in-place
- haveSSRC = ! _mapClients[authToken].sessId().isEmpty();
+ haveSSRC = ! _mapClients[authToken]->sessId().isEmpty();
}
return haveSSRC;
}
@@ -337,11 +356,11 @@
void MapSessions::removeActiveSSRCForClient(const QString& authToken)
{
if (_mapClients.contains(authToken) &&
- _mapClients[authToken].hasActiveSSRC()) {
+ _mapClients[authToken]->hasActiveSSRC()) {
// LFu: manipulate hash element in-place
- MapClient& client = _mapClients[authToken];
- client.setHasActiveSSRC(false);
- client.clearSessId();
+ MapClient* client = _mapClients[authToken];
+ client->setHasActiveSSRC(false);
+ client->clearSessId();
_ssrcConnections.remove(authToken);
}
@@ -352,7 +371,7 @@
QString sessId;
if (_mapClients.contains(authToken)) {
// LFu: access hash element in-place
- sessId = _mapClients[authToken].sessId();
+ sessId = _mapClients[authToken]->sessId();
}
return sessId;
}
@@ -361,12 +380,12 @@
{
QString pubId;
- QHash<QString, MapClient>::const_iterator i = _mapClients.constBegin();
+ QHash<QString, MapClient*>::const_iterator i = _mapClients.constBegin();
while (i != _mapClients.constEnd()) {
- const MapClient& client = i.value();
- if (client.sessId() == sessId) {
- pubId = client.pubId();
+ const MapClient* client = i.value();
+ if (client->sessId() == sessId) {
+ pubId = client->pubId();
break;
}
++i;
@@ -396,9 +415,9 @@
qDebug() << __PRETTY_FUNCTION__ << ":" << "Got session-id to use:" <<
sessId;
// LFu: code changed to modify MapClient in-place
- MapClient& client = _mapClients[authToken];
- client.setSessId(sessId);
- client.setHasActiveSSRC(true);
+ MapClient* client = _mapClients[authToken];
+ client->setSessId(sessId);
+ client->setHasActiveSSRC(true);
_ssrcConnections.insert(authToken, clientHandler);
}
@@ -409,8 +428,8 @@
{
bool rc = false;
if (_mapClients.contains(authToken) &&
- _mapClients[authToken].hasActiveSSRC() &&
- _mapClients[authToken].sessId() == sessId) {
+ _mapClients[authToken]->hasActiveSSRC() &&
+ _mapClients[authToken]->sessId() == sessId) {
rc = true;
}
return rc;
@@ -420,7 +439,7 @@
{
QString pubId;
if (_mapClients.contains(authToken)) {
- pubId = _mapClients[authToken].pubId();
+ pubId = _mapClients[authToken]->pubId();
}
return pubId;
}
@@ -429,7 +448,7 @@
{
OmapdConfig::AuthzOptions authz =
_omapdConfig->valueFor("default_authorization").value<OmapdConfig::AuthzOptions>();
if (_mapClients.contains(authToken)) {
- authz = _mapClients[authToken].authz();
+ authz = _mapClients[authToken]->authz();
}
return authz;
}
@@ -438,7 +457,7 @@
{
bool clientAuthorized = false;
if (_mapClients.contains(authToken)) {
- const QString& policyName = _mapClients[authToken].metadataPolicy();
+ const QString& policyName = _mapClients[authToken]->metadataPolicy();
if (policyName.isEmpty()) {
// No policy defined for client
@@ -468,7 +487,7 @@
{
bool rc = false;
if (_mapClients.contains(authToken)) {
- rc = _mapClients[authToken].hasActivePoll();
+ rc = _mapClients[authToken]->hasActivePoll();
}
return rc;
}
@@ -477,8 +496,8 @@
{
if (_mapClients.contains(authToken)) {
- MapClient& client = _mapClients[authToken];
- client.setHasActivePoll(true);
+ MapClient* client = _mapClients[authToken];
+ client->setHasActivePoll(true);
_activePollConnections.insert(authToken, pollClientHandler);
}
@@ -487,9 +506,9 @@
void MapSessions::removeActivePollForClient(const QString& authToken)
{
if (_mapClients.contains(authToken) &&
- _mapClients[authToken].hasActivePoll()) {
+ _mapClients[authToken]->hasActivePoll()) {
- _mapClients[authToken].setHasActivePoll(false);
+ _mapClients[authToken]->setHasActivePoll(false);
_activePollConnections.remove(authToken);
}
}
@@ -498,8 +517,8 @@
{
ClientHandler* clientHandler = 0;
if (_mapClients.contains(authToken) &&
- _mapClients[authToken].hasActiveARC() &&
- _mapClients[authToken].hasActivePoll()) {
+ _mapClients[authToken]->hasActiveARC() &&
+ _mapClients[authToken]->hasActivePoll()) {
clientHandler = _activePollConnections.value(authToken, 0);
}
return clientHandler;
@@ -509,7 +528,7 @@
{
ClientHandler* clientHandler = 0;
if (_mapClients.contains(authToken) &&
- _mapClients[authToken].hasActiveSSRC()) {
+ _mapClients[authToken]->hasActiveSSRC()) {
clientHandler = _ssrcConnections.value(authToken, 0);
}
return clientHandler;
@@ -518,7 +537,7 @@
void MapSessions::migrateSSRCForClient(const QString& authToken,
ClientHandler *newSSRCClientHandler)
{
if (_mapClients.contains(authToken) &&
- _mapClients[authToken].hasActiveSSRC()) {
+ _mapClients[authToken]->hasActiveSSRC()) {
ClientHandler *oldConnection = _ssrcConnections.take(authToken);
_ssrcConnections.insert(authToken, newSSRCClientHandler);
oldConnection->disconnectFromHost();
@@ -528,9 +547,9 @@
void MapSessions::setActiveARCForClient(const QString& authToken,
ClientHandler *arcClientHandler)
{
if (_mapClients.contains(authToken) &&
- _mapClients[authToken].hasActiveSSRC()) {
+ _mapClients[authToken]->hasActiveSSRC()) {
- _mapClients[authToken].setHasActiveARC(true);
+ _mapClients[authToken]->setHasActiveARC(true);
_arcConnections.insert(authToken, arcClientHandler);
}
@@ -540,7 +559,7 @@
{
bool rc = false;
if (_mapClients.contains(authToken) &&
- _mapClients[authToken].hasActiveARC()) {
+ _mapClients[authToken]->hasActiveARC()) {
rc = true;
}
return rc;
@@ -549,9 +568,9 @@
void MapSessions::removeActiveARCForClient(const QString& authToken)
{
if (_mapClients.contains(authToken) &&
- _mapClients[authToken].hasActiveARC()) {
+ _mapClients[authToken]->hasActiveARC()) {
- _mapClients[authToken].setHasActiveARC(false);
+ _mapClients[authToken]->setHasActiveARC(false);
_arcConnections.remove(authToken);
}
}
@@ -560,20 +579,20 @@
{
ClientHandler* clientHandler = 0;
if (_mapClients.contains(authToken) &&
- _mapClients[authToken].hasActiveARC()) {
+ _mapClients[authToken]->hasActiveARC()) {
clientHandler = _arcConnections.value(authToken, 0);
}
return clientHandler;
}
-QList<Subscription>& MapSessions::subscriptionListForClient(const QString&
authToken)
+QList<Subscription*>& MapSessions::subscriptionListForClient(const
QString& authToken)
{
// LFu: changed this to return a reference to the client subscriptions and
// changed usage of the method to make changes in-place. Before, the caller
// retrieved a copy of the list, changed that list and then had to restore
// the whole list back in order to make changes
- return _mapClients[authToken].subscriptionList();
+ return _mapClients[authToken]->subscriptionList();
// was:
// QList<Subscription> subList;
@@ -583,36 +602,48 @@
// return subList;
}
-// LFu: instead of removing and re-inserting the MapClient,
-// manipulate the subscription list directly. Also, return an int instead
of a
-// copy of the whole list
-int MapSessions::removeSubscriptionListForClient(const QString& authToken)
+void MapSessions::insertSubscriptionForClient(Subscription* sub, const
QString& authToken)
+{
+ if (_mapClients.contains(authToken)) {
+ _mapClients[authToken]->insertSubscription(sub);
+ }
+}
+
+void MapSessions::removeSubscriptionForClient(const QString& name, const
QString& authToken)
{
- int result = 0;
if (_mapClients.contains(authToken)) {
- MapClient& client = _mapClients[authToken];
- result = client.subscriptionList().size();
- client.emptySubscriptionList();
+ _mapClients[authToken]->removeSubscription(name);
}
- return result;
+
}
-void MapSessions::setSubscriptionListForClient(const QString& authToken,
const QList<Subscription>& subList)
+int MapSessions::removeSubscriptionListForClient(const QString& authToken)
{
+ int result = 0;
if (_mapClients.contains(authToken)) {
- _mapClients[authToken].setSubscriptionList(subList);
+ MapClient* client = _mapClients[authToken];
+ result = client->subscriptionList().size();
+ client->clearSubscriptionList();
}
+ return result;
}
-QHash<QString, QList<Subscription> > MapSessions::subscriptionLists()
+//void MapSessions::setSubscriptionListForClient(const QString& authToken,
const QList<Subscription>& subList)
+//{
+// if (_mapClients.contains(authToken)) {
+// _mapClients[authToken].setSubscriptionList(subList);
+// }
+//}
+
+QHash<QString, QList<Subscription*> > MapSessions::subscriptionLists()
{
- QHash<QString, QList<Subscription> > allSubLists;
+ QHash<QString, QList<Subscription*> > allSubLists;
- QHashIterator<QString, MapClient> clientIt(_mapClients);
+ QHashIterator<QString, MapClient*> clientIt(_mapClients);
while (clientIt.hasNext()) {
clientIt.next();
- if (clientIt.value().subscriptionList().size() > 0) {
- allSubLists.insert(clientIt.key(), clientIt.value().subscriptionList());
+ if (clientIt.value()->subscriptionList().size() > 0) {
+ allSubLists.insert(clientIt.key(), clientIt.value()->subscriptionList());
}
}
return allSubLists;
=======================================
--- /branches/lfu/mapsessions.h Fri May 24 23:06:39 2013
+++ /branches/lfu/mapsessions.h Tue May 28 13:50:58 2013
@@ -67,10 +67,12 @@
OmapdConfig::AuthzOptions authzForAuthToken(const QString& authToken);
bool metadataAuthorizationForAuthToken(const QString& authToken, const
QString& metaName, const QString& metaNamespace);
- QList<Subscription>& subscriptionListForClient(const QString& authToken);
+ QList<Subscription*>& subscriptionListForClient(const QString& authToken);
+ void insertSubscriptionForClient(Subscription* sub, const
QString&_authToken);
+ void removeSubscriptionForClient(const QString& name, const
QString&_authToken);
int removeSubscriptionListForClient(const QString& authToken);
- void setSubscriptionListForClient(const QString& authToken, const
QList<Subscription>& subList);
- QHash<QString, QList<Subscription> > subscriptionLists(); // authToken
--> subscriptionList for authToken
+ // void setSubscriptionListForClient(const QString& authToken, const
QList<Subscription>& subList);
+ QHash<QString, QList<Subscription*> > subscriptionLists(); // authToken
--> subscriptionList for authToken
bool validateMetadata(const Meta& aMeta);
@@ -79,6 +81,9 @@
bool loadClientConfiguration(const ClientConfiguration *client);
bool removeClientConfiguration(ClientConfiguration *client);
+ void removeMapClient(const QString& authToken);
+ void removeMapClientCA(const QString& authToken);
+
private:
MapSessions(QObject *parent = 0);
~MapSessions();
@@ -88,8 +93,8 @@
OmapdConfig *_omapdConfig;
- QHash<QString, MapClient> _mapClients; // authToken --> MapClient
- QHash<QString, MapClient> _mapClientCAs; // CA AuthToken --> MapClient
+ QHash<QString, MapClient*> _mapClients; // authToken --> MapClient
+ QHash<QString, MapClient*> _mapClientCAs; // CA AuthToken --> MapClient
// Registry for published vendor specific metadata cardinalities
QHash<VSM, Meta::Cardinality> _vsmRegistry;