X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/997bba367501ec4798785cfaf4a05d2b2d1218cf..dde11e605346b64d3ae0a39295fb5428298cfa3e:/src/unix/dialup.cpp diff --git a/src/unix/dialup.cpp b/src/unix/dialup.cpp index cec1aa24d1..fb16e317bb 100644 --- a/src/unix/dialup.cpp +++ b/src/unix/dialup.cpp @@ -212,7 +212,7 @@ public: { m_started = TRUE; return wxTimer::Start(millisecs, FALSE); } virtual void Notify() - { wxLogTrace("Checking dial up network status."); m_dupman->CheckStatus(); } + { wxLogTrace(wxT("Checking dial up network status.")); m_dupman->CheckStatus(); } virtual void Stop() { if ( m_started ) wxTimer::Stop(); } @@ -251,11 +251,13 @@ wxDialUpManagerImpl::wxDialUpManagerImpl() m_BeaconHost = WXDIALUP_MANAGER_DEFAULT_BEACONHOST; m_BeaconPort = 80; SetConnectCommand("pon", "poff"); // default values for Debian/GNU linux +#if 0 wxChar * dial = wxGetenv(_T("WXDIALUP_DIALCMD")); wxChar * hup = wxGetenv(_T("WXDIALUP_HUPCMD")); if(dial || hup) SetConnectCommand(dial ? wxString(dial) : m_ConnectCommand, hup ? wxString(hup) : m_HangUpCommand); +#endif } wxDialUpManagerImpl::~wxDialUpManagerImpl() @@ -279,7 +281,7 @@ wxDialUpManagerImpl::Dial(const wxString &isp, m_IsOnline = -1; m_ISPname = isp; wxString cmd; - if(m_ConnectCommand.Find("%s")) + if(m_ConnectCommand.Find(wxT("%s"))) cmd.Printf(m_ConnectCommand,m_ISPname.c_str()); else cmd = m_ConnectCommand; @@ -313,7 +315,7 @@ wxDialUpManagerImpl::HangUp(void) } m_IsOnline = -1; wxString cmd; - if(m_HangUpCommand.Find("%s")) + if(m_HangUpCommand.Find(wxT("%s"))) cmd.Printf(m_HangUpCommand,m_ISPname.c_str(), m_DialProcess); else cmd = m_HangUpCommand; @@ -332,7 +334,7 @@ wxDialUpManagerImpl::CancelDialing() bool wxDialUpManagerImpl::EnableAutoCheckOnlineStatus(size_t nSeconds) { - wxASSERT(m_timer == NULL); + DisableAutoCheckOnlineStatus(); m_timer = new AutoCheckTimer(this); bool rc = m_timer->Start(nSeconds*1000); if(! rc) @@ -359,11 +361,11 @@ void wxDialUpManagerImpl::SetWellKnownHost(const wxString& hostname, int portno) { /// does hostname contain a port number? - wxString port = hostname.After(':'); + wxString port = hostname.After(wxT(':')); if(port.Length()) { - m_BeaconHost = hostname.Before(':'); - m_BeaconPort = atoi(port); + m_BeaconHost = hostname.Before(wxT(':')); + m_BeaconPort = wxAtoi(port); } else { @@ -468,7 +470,7 @@ wxDialUpManagerImpl::CheckStatusInternal(void) struct sockaddr_in serv_addr; m_IsOnline = 0; // assume false - if((hp = gethostbyname(m_BeaconHost)) == NULL) + if((hp = gethostbyname(m_BeaconHost.mb_str())) == NULL) return; // no DNS no net serv_addr.sin_family = hp->h_addrtype;