Permalink
Browse files

fix HostAndPort toString

  • Loading branch information...
1 parent 7d5861a commit 14482d8cc191644a554ce8bd2da2927b2e3e6f01 @erh erh committed Jul 30, 2010
Showing with 10 additions and 8 deletions.
  1. +10 −8 util/hostandport.h
View
@@ -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();
}

0 comments on commit 14482d8

Please sign in to comment.