summaryrefslogtreecommitdiff
path: root/src/mongo/shell/clientAndShell.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/shell/clientAndShell.cpp')
-rw-r--r--src/mongo/shell/clientAndShell.cpp57
1 files changed, 28 insertions, 29 deletions
diff --git a/src/mongo/shell/clientAndShell.cpp b/src/mongo/shell/clientAndShell.cpp
index 07f9b5cd83a..2f55cef17aa 100644
--- a/src/mongo/shell/clientAndShell.cpp
+++ b/src/mongo/shell/clientAndShell.cpp
@@ -39,44 +39,43 @@
namespace mongo {
- using std::endl;
- using std::string;
- using std::vector;
+using std::endl;
+using std::string;
+using std::vector;
- class Client;
- class DBClientBase;
- class OperationContext;
+class Client;
+class DBClientBase;
+class OperationContext;
- bool dbexitCalled = false;
+bool dbexitCalled = false;
- void dbexit( ExitCode returnCode, const char *whyMsg ) {
- {
- stdx::lock_guard<stdx::mutex> lk( shell_utils::mongoProgramOutputMutex );
- dbexitCalled = true;
- }
-
- log() << "dbexit called" << endl;
+void dbexit(ExitCode returnCode, const char* whyMsg) {
+ {
+ stdx::lock_guard<stdx::mutex> lk(shell_utils::mongoProgramOutputMutex);
+ dbexitCalled = true;
+ }
- if (whyMsg) {
- log() << " b/c " << whyMsg << endl;
- }
+ log() << "dbexit called" << endl;
- log() << "exiting" << endl;
- quickExit( returnCode );
+ if (whyMsg) {
+ log() << " b/c " << whyMsg << endl;
}
- bool inShutdown() {
- return dbexitCalled;
- }
+ log() << "exiting" << endl;
+ quickExit(returnCode);
+}
- bool haveLocalShardingInfo( Client* client, const string& ns ) {
- return false;
- }
+bool inShutdown() {
+ return dbexitCalled;
+}
- DBClientBase* createDirectClient(OperationContext* txn) {
- uassert( 10256 , "no createDirectClient in clientOnly" , 0 );
- return 0;
- }
+bool haveLocalShardingInfo(Client* client, const string& ns) {
+ return false;
+}
+DBClientBase* createDirectClient(OperationContext* txn) {
+ uassert(10256, "no createDirectClient in clientOnly", 0);
+ return 0;
+}
}