]> git.saurik.com Git - wxWidgets.git/blobdiff - src/unix/dialup.cpp
Fix typo in last commit
[wxWidgets.git] / src / unix / dialup.cpp
index edf6657b309bc6d1c9a8c7adbf39e688bff12a0c..2482dfb28a46d19da698fa6cc8ec273293353d3e 100644 (file)
@@ -395,7 +395,7 @@ void wxDialUpManagerImpl::DisableAutoCheckOnlineStatus()
 
 void wxDialUpManagerImpl::SetWellKnownHost(const wxString& hostname, int portno)
 {
-   if(hostname.length() == 0)
+   if( hostname.empty() )
    {
       m_BeaconHost = WXDIALUP_MANAGER_DEFAULT_BEACONHOST;
       m_BeaconPort = 80;
@@ -404,7 +404,7 @@ void wxDialUpManagerImpl::SetWellKnownHost(const wxString& hostname, int portno)
 
    // does hostname contain a port number?
    wxString port = hostname.After(wxT(':'));
-   if(port.length())
+   if( !port.empty() )
    {
       m_BeaconHost = hostname.Before(wxT(':'));
       m_BeaconPort = wxAtoi(port);
@@ -608,7 +608,10 @@ wxDialUpManagerImpl::CheckProcNet()
 
             while (fgets(output, 256, f) != NULL)
             {
-                if ( strstr(output, "eth") ) // network card
+                // Test for the known network interface names
+                if ( strstr(output, "eth")
+                        || strstr(output, "wlan")
+                        || strstr(output, "ath") )
                 {
                     netDevice |= NetDevice_LAN;
                 }
@@ -667,7 +670,7 @@ wxDialUpManagerImpl::CheckIfconfig()
     {
         wxLogNull ln; // suppress all error messages
 
-        wxASSERT_MSG( m_IfconfigPath.length(),
+        wxASSERT_MSG( !m_IfconfigPath.empty(),
                       wxT("can't use ifconfig if it wasn't found") );
 
         wxString tmpfile = wxFileName::CreateTempFileName( wxT("_wxdialuptest") );