summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2010-07-30 15:34:11 -0400
committerEliot Horowitz <eliot@10gen.com>2010-07-30 15:34:11 -0400
commit14482d8cc191644a554ce8bd2da2927b2e3e6f01 (patch)
treea525e55e724a31e5e490982f598e25a2997d9743
parent7d5861a7c65eab57f725e9bea9a1532e48835a66 (diff)
downloadmongo-14482d8cc191644a554ce8bd2da2927b2e3e6f01.tar.gz
fix HostAndPort toString
-rw-r--r--util/hostandport.h18
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();
}