summaryrefslogtreecommitdiff
path: root/project2/json
diff options
context:
space:
mode:
Diffstat (limited to 'project2/json')
-rw-r--r--project2/json/couchSession.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/project2/json/couchSession.cpp b/project2/json/couchSession.cpp
index 35650f2..fbe38f8 100644
--- a/project2/json/couchSession.cpp
+++ b/project2/json/couchSession.cpp
@@ -22,7 +22,7 @@ class CouchSessionContainer : public SessionContainer {
virtual SessionPtr getSession(const UUID & uuid) const {
try {
json::Object obj = getSessionFromServer(uuid);
- if (boost::get<json::Number>(*safeMapFind<Session::VariableNotFound>(obj, ExpiryKey)->second) > time(NULL)) {
+ if (boost::get<json::Number>(*safeMapLookup<Session::VariableNotFound>(obj, ExpiryKey)) > time(NULL)) {
SessionPtr s = new Session(uuid);
BOOST_FOREACH(const json::Object::value_type & v, obj) {
s->SetValue(v.first, boost::apply_visitor(JsonToProject2(), *v.second));
@@ -162,10 +162,10 @@ class CustomCouchSessionLoader : public SessionContainerLoaderImpl<CouchSessionC
c->setopt(CURLOPT_URL, (b + "_temp_view").c_str());
c->performRead(boost::bind(CouchSessionContainer::append, &msg, _1, _2));
json::Object o = json::parseObject(msg);
- BOOST_FOREACH(const json::Array::value_type & v, boost::get<json::Array>(*safeMapFind<ParamNotFound>(o, "rows")->second)) {
+ BOOST_FOREACH(const json::Array::value_type & v, boost::get<json::Array>(*safeMapLookup<ParamNotFound>(o, "rows"))) {
json::Object rec = boost::get<json::Object>(*v);
- UUID u = boost::get<json::String>(*safeMapFind<ParamNotFound>(rec, "id")->second).raw();
- Glib::ustring & rev = boost::get<json::String>(*safeMapFind<ParamNotFound>(rec, "value")->second);
+ UUID u = boost::get<json::String>(*safeMapLookup<ParamNotFound>(rec, "id")).raw();
+ Glib::ustring & rev = boost::get<json::String>(*safeMapLookup<ParamNotFound>(rec, "value"));
deleteSession(u, rev);
}
return;