diff options
author | Dwight <dmerriman@gmail.com> | 2009-08-25 10:24:44 -0400 |
---|---|---|
committer | Dwight <dmerriman@gmail.com> | 2009-08-25 10:24:44 -0400 |
commit | 2706a281233e0cef00cc92437865269a057b0707 (patch) | |
tree | bc119c609a68a9337e728b7b401bf59deffa3357 /db/cloner.cpp | |
parent | 360dc900a0e45481b535662acb5fd9970eba55ab (diff) | |
download | mongo-2706a281233e0cef00cc92437865269a057b0707.tar.gz |
begin cmdline.h
Diffstat (limited to 'db/cloner.cpp')
-rw-r--r-- | db/cloner.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/db/cloner.cpp b/db/cloner.cpp index c848a6b9619..b91552c63a1 100644 --- a/db/cloner.cpp +++ b/db/cloner.cpp @@ -30,7 +30,6 @@ namespace mongo { void ensureHaveIdIndex(const char *ns); - extern int port; bool replAuthenticate(DBClientConnection *); @@ -142,8 +141,8 @@ namespace mongo { string todb = database->name; stringstream a,b; - a << "localhost:" << port; - b << "127.0.0.1:" << port; + a << "localhost:" << cmdLine.port; + b << "127.0.0.1:" << cmdLine.port; bool masterSameProcess = ( a.str() == masterHost || b.str() == masterHost ); if ( masterSameProcess ) { if ( fromdb == todb && database->path == dbpath ) { @@ -552,7 +551,7 @@ namespace mongo { if ( fromhost.empty() ) { /* copy from self */ stringstream ss; - ss << "localhost:" << port; + ss << "localhost:" << cmdLine.port; fromhost = ss.str(); } string fromdb = cmdObj.getStringField("fromdb"); |