]> git.saurik.com Git - wxWidgets.git/blobdiff - src/unix/dialup.cpp
fixed crash in wxKill() introduced by 1.116 patch (ironically named "proper
[wxWidgets.git] / src / unix / dialup.cpp
index f0bb49e961b19aaa7239b37912b08117025db36f..8526915b7bbf53eb3997a61f4a8901abe15725f3 100644 (file)
@@ -1,6 +1,6 @@
 // -*- c++ -*- ////////////////////////////////////////////////////////////////
 // Name:        unix/dialup.cpp
-// Purpose:     Network related wxWindows classes and functions
+// Purpose:     Network related wxWidgets classes and functions
 // Author:      Karsten Ballüder
 // Modified by:
 // Created:     03.10.99
@@ -9,12 +9,15 @@
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
 
-#include "wx/setup.h"
-
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
 #   pragma implementation "dialup.h"
 #endif
 
+// for compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
+#include "wx/setup.h"
+
 #if wxUSE_DIALUP_MANAGER
 
 #ifndef  WX_PRECOMP
@@ -247,21 +250,18 @@ class AutoCheckTimer : public wxTimer
 {
 public:
    AutoCheckTimer(wxDialUpManagerImpl *dupman)
-      {
-         m_dupman = dupman;
-         m_started = FALSE;
-      }
-
-   virtual bool Start( int millisecs = -1, bool WXUNUSED(one_shot) = FALSE )
-      { m_started = TRUE; return wxTimer::Start(millisecs, FALSE); }
+   {
+       m_dupman = dupman;
+   }
 
    virtual void Notify()
-      { wxLogTrace(wxT("Checking dial up network status.")); m_dupman->CheckStatus(); }
+   {
+       wxLogTrace(_T("dialup"), wxT("Checking dial up network status."));
+
+       m_dupman->CheckStatus();
+   }
 
-   virtual void Stop()
-      { if ( m_started ) wxTimer::Stop(); }
 public:
-   bool m_started;
    wxDialUpManagerImpl *m_dupman;
 };
 
@@ -716,8 +716,8 @@ wxDialUpManagerImpl::CheckIfconfig()
 
 #if defined(__SOLARIS__) || defined (__SUNOS__)
                     // dialup device under SunOS/Solaris
-                    hasModem = strstr(output,"ipdptp") != (char *)NULL;
-                    hasLAN = strstr(output, "hme") != (char *)NULL;
+                    hasModem = strstr(output.fn_str(),"ipdptp") != (char *)NULL;
+                    hasLAN = strstr(output.fn_str(), "hme") != (char *)NULL;
 #elif defined(__LINUX__) || defined (__FREEBSD__)
                     hasModem = strstr(output.fn_str(),"ppp")    // ppp
                         || strstr(output.fn_str(),"sl")  // slip