From: Bert Hubert Date: Sun, 29 May 2011 19:19:58 +0000 (+0000) Subject: latest revision of the mongodb backend X-Git-Tag: auth-3.0~46 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1eb7bc30be4a499dc1170661c07adce5ba0f261f;p=pdns latest revision of the mongodb backend git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@2203 d19b8d6e-7fed-0310-83ef-9ca221ded41b --- diff --git a/modules/mongodbbackend/dnssec.cc b/modules/mongodbbackend/dnssec.cc index 46e20b7c3..eca546ffe 100644 --- a/modules/mongodbbackend/dnssec.cc +++ b/modules/mongodbbackend/dnssec.cc @@ -281,9 +281,11 @@ bool MONGODBBackend::removeDomainKey(const string& name, unsigned int id) { } m_db.update(collection_cryptokeys, mongo_q, update ); + + string m_error = m_db.getLastError(); - if(logging_cerr) - cerr << backend_name << "(removeDomainKey) getLastError: "<< m_db.getLastError()<< endl; + if(logging_cerr && !m_error.empty()) + cerr << backend_name << "(removeDomainKey) getLastError: "<< m_error << endl; return true; //?? how do we know that ?? } diff --git a/modules/mongodbbackend/minimal.cc b/modules/mongodbbackend/minimal.cc index 9ff8b4eba..333a6c459 100644 --- a/modules/mongodbbackend/minimal.cc +++ b/modules/mongodbbackend/minimal.cc @@ -65,28 +65,67 @@ MONGODBBackend::MONGODBBackend(const string &suffix) { if (checkindex) { L<id = mongo_r->getIntField("domain_id"); di->last_check = mongo_r->getIntField("last_check"); + di->notified_serial = mongo_r->getIntField("notified_serial"); if (soadata == NULL) for( bson::bo::iterator i(mongo_r->getObjectField("masters")); i.more(); ) {