size_t GetISPNames(class wxArrayString &) const
{ return 0; }
-
+
// sometimes the built-in logic for determining the online status may fail,
// so, in general, the user should be allowed to override it. This function
// allows to forcefully set the online status - whatever our internal
int m_CanUsePing;
/// The path to ping program
wxString m_PingPath;
-
+
/// beacon host:
wxString m_BeaconHost;
/// beacon host portnumber for connect:
int CheckPing(void);
/// Check by connecting to host on given port.
int CheckConnect(void);
-
+
};
wxChar * hup = wxGetenv(_T("WXDIALUP_HUPCMD"));
if(dial || hup)
SetConnectCommand(dial ? wxString(dial) : m_ConnectCommand,
- hup ? wxString(hup) : m_HangUpCommand);
+ hup ? wxString(hup) : m_HangUpCommand);
}
wxDialUpManagerImpl::~wxDialUpManagerImpl()
if((hp = gethostbyname(m_BeaconHost.mb_str())) == NULL)
return 0; // no DNS no net
-
+
serv_addr.sin_family = hp->h_addrtype;
memcpy(&serv_addr.sin_addr,hp->h_addr, hp->h_length);
serv_addr.sin_port = htons(m_BeaconPort);
int sockfd;
- if( ( sockfd = socket(hp->h_addrtype, SOCK_STREAM, 0)) < 0)
- {
+ if( ( sockfd = socket(hp->h_addrtype, SOCK_STREAM, 0)) < 0)
+ {
return -1; // no info
}
-
+
if( connect(sockfd, (struct sockaddr *) &serv_addr,
sizeof(serv_addr)) >= 0)
{
// dialup device under SunOS/Solaris
rc = strstr(output,"ipdptp") != (char *)NULL;
#elif defined(__LINUX__) || defined (__FREEBSD__)
- rc = strstr(output,"ppp") // ppp
- || strstr(output,"sl") // slip
- || strstr(output,"pl") // plip
+ rc = strstr(output,"ppp") // ppp
+ || strstr(output,"sl") // slip
+ || strstr(output,"pl"); // plip
#elif defined(__SGI__) // IRIX
rc = strstr(output, "ppp"); // PPP
#endif
{
if(! m_CanUsePing)
return -1;
-
+
// First time check for ping location. We only use the variant
// which does not take arguments, a la GNU.
if(m_CanUsePing == -1) // unknown