summaryrefslogtreecommitdiff
path: root/db/repl/connections.h
diff options
context:
space:
mode:
Diffstat (limited to 'db/repl/connections.h')
-rw-r--r--db/repl/connections.h15
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;
- }*/
-
}