From 2706a281233e0cef00cc92437865269a057b0707 Mon Sep 17 00:00:00 2001 From: Dwight Date: Tue, 25 Aug 2009 10:24:44 -0400 Subject: begin cmdline.h --- db/cloner.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'db/cloner.cpp') 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"); -- cgit v1.2.1