X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5276b0a53cef4815230e39b54d2ecda14f72cbd1..25db2c25bc488fcdd10cc5d2fd4938fd78b1cf0e:/src/unix/net.cpp diff --git a/src/unix/net.cpp b/src/unix/net.cpp index 0516d9ef1b..268eb46b06 100644 --- a/src/unix/net.cpp +++ b/src/unix/net.cpp @@ -1,5 +1,5 @@ // -*- c++ -*- /////////////////////////////////////////////////////////////// -// Name: unix/net.cpp +// Name: src/unix/net.cpp // Purpose: Network related wxWindows classes and functions // Author: Karsten Ballüder // Modified by: @@ -255,15 +255,15 @@ wxDialUpManagerImpl::SetWellKnownHost(const wxString& hostname, int portno) { /// does hostname contain a port number? wxString port = hostname.After(':'); - if(port.Length()) + if(port.empty()) { - m_BeaconHost = hostname.Before(':'); - m_BeaconPort = atoi(port); + m_BeaconHost = hostname; + m_BeaconPort = portno; } else { - m_BeaconHost = hostname; - m_BeaconPort = portno; + m_BeaconHost = hostname.Before(':'); + m_BeaconPort = atoi(port); } } @@ -319,7 +319,7 @@ wxDialUpManagerImpl::CheckStatusInternal(void) // Let's try the ifconfig method first, should be fastest: if(m_CanUseIfconfig != 0) // unknown or yes { - wxASSERT(m_IfconfigPath.length()); + wxASSERT( !m_IfconfigPath.empty() ); wxString tmpfile = wxFileName::CreateTempFileName("_wxdialuptest"); wxString cmd = "/bin/sh -c \'";