diff options
author | Antonin Kral <a.kral@bobek.cz> | 2011-09-14 17:08:06 +0200 |
---|---|---|
committer | Antonin Kral <a.kral@bobek.cz> | 2011-09-14 17:08:06 +0200 |
commit | 5d342a758c6095b4d30aba0750b54f13b8916f51 (patch) | |
tree | 762e9aa84781f5e3b96db2c02d356c29cf0217c0 /db/repl/connections.h | |
parent | cbe2d992e9cd1ea66af9fa91df006106775d3073 (diff) | |
download | mongodb-5d342a758c6095b4d30aba0750b54f13b8916f51.tar.gz |
Imported Upstream version 2.0.0
Diffstat (limited to 'db/repl/connections.h')
-rw-r--r-- | db/repl/connections.h | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/db/repl/connections.h b/db/repl/connections.h index 7e7bfe5..78cfb30 100644 --- a/db/repl/connections.h +++ b/db/repl/connections.h @@ -20,7 +20,7 @@ #include <map> #include "../../client/dbclient.h" -#include "../security_key.h" +#include "../security_common.h" namespace mongo { @@ -44,13 +44,14 @@ namespace mongo { public: /** throws assertions if connect failure etc. */ ScopedConn(string hostport); - ~ScopedConn(); + ~ScopedConn() { + // conLock releases... + } /* If we were to run a query and not exhaust the cursor, future use of the connection would be problematic. So here what we do is wrapper known safe methods and not allow cursor-style queries at all. This makes ScopedConn limited in functionality but very safe. More non-cursor wrappers can be added here if needed. */ - bool runCommand(const string &dbname, const BSONObj& cmd, BSONObj &info, int options=0) { return conn()->runCommand(dbname, cmd, info, options); } @@ -108,12 +109,4 @@ namespace mongo { } } - inline ScopedConn::~ScopedConn() { - // conLock releases... - } - - /*inline DBClientConnection* ScopedConn::operator->() { - return &x->cc; - }*/ - } |