X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/65391c8ffcb388cd31f610776654f50aed97cbee..afab8b85c4bdeb11a248c57d13e9bcfa14149ef8:/src/unix/net.cpp?ds=inline diff --git a/src/unix/net.cpp b/src/unix/net.cpp index ab4936b946..3125aadc2c 100644 --- a/src/unix/net.cpp +++ b/src/unix/net.cpp @@ -1,10 +1,9 @@ // -*- c++ -*- /////////////////////////////////////////////////////////////// -// Name: unix/net.cpp +// Name: src/unix/net.cpp // Purpose: Network related wxWindows classes and functions // Author: Karsten Ballüder // Modified by: // Created: 03.10.99 -// RCS-ID: $Id$ // Copyright: (c) Karsten Ballüder // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -236,8 +235,7 @@ wxDialUpManagerImpl::EnableAutoCheckOnlineStatus(size_t nSeconds) bool rc = m_timer->Start(nSeconds*1000); if(! rc) { - delete m_timer; - m_timer = NULL; + wxDELETE(m_timer); } return rc; } @@ -247,8 +245,7 @@ wxDialUpManagerImpl::DisableAutoCheckOnlineStatus() { wxASSERT(m_timer != NULL); m_timer->Stop(); - delete m_timer; - m_timer = NULL; + wxDELETE(m_timer); } @@ -257,15 +254,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); } } @@ -321,7 +318,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 \'";