changed port number from a short to an unsigned int

This commit is contained in:
AJ Kelly
2011-03-27 17:49:18 -05:00
parent 322f8feafc
commit cd768cbb8c
+3 -3
View File
@@ -107,12 +107,12 @@ void NetworkSyncManager::CloseConnection()
void NetworkSyncManager::PostStartUp( const RString& ServerIP )
{
RString sAddress;
short iPort;
unsigned int iPort;
size_t cLoc = ServerIP.find( ':' );
if( ServerIP.find( ':' ) != RString::npos )
{
iPort = (short) atoi( ServerIP.substr( cLoc + 1 ).c_str() );
iPort = (unsigned int)atoi( ServerIP.substr( cLoc + 1 ).c_str() );
sAddress = ServerIP.substr( 0, cLoc );
}
else
@@ -121,7 +121,7 @@ void NetworkSyncManager::PostStartUp( const RString& ServerIP )
sAddress = ServerIP;
}
LOG->Info( "Attempting to connect to: %s, Port: %d", sAddress.c_str(), iPort );
LOG->Info( "Attempting to connect to: %s, Port: %i", sAddress.c_str(), iPort );
CloseConnection();
if( !Connect(sAddress.c_str(), iPort) )