diff options
author | Eliot Horowitz <eliot@10gen.com> | 2010-07-30 15:34:11 -0400 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2010-07-30 15:34:11 -0400 |
commit | 14482d8cc191644a554ce8bd2da2927b2e3e6f01 (patch) | |
tree | a525e55e724a31e5e490982f598e25a2997d9743 | |
parent | 7d5861a7c65eab57f725e9bea9a1532e48835a66 (diff) | |
download | mongo-14482d8cc191644a554ce8bd2da2927b2e3e6f01.tar.gz |
fix HostAndPort toString
-rw-r--r-- | util/hostandport.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/util/hostandport.h b/util/hostandport.h index 55bc4b3fe1d..63243fff8cb 100644 --- a/util/hostandport.h +++ b/util/hostandport.h @@ -101,17 +101,19 @@ namespace mongo { inline string HostAndPort::toString() const { stringstream ss; ss << _host; - if( _port != -1 ) ss << ':'; + if ( _port != -1 ){ + ss << ':'; #if defined(_DEBUG) - if( _port >= 44000 && _port < 44100 ) { - log() << "warning: special debug port 44xxx used" << endl; - ss << _port+1; - } - else - ss << _port; + if( _port >= 44000 && _port < 44100 ) { + log() << "warning: special debug port 44xxx used" << endl; + ss << _port+1; + } + else + ss << _port; #else - ss << _port; + ss << _port; #endif + } return ss.str(); } |