oops, compilation fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4573 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -127,7 +127,7 @@ public:
|
|||||||
|
|
||||||
size_t GetISPNames(class wxArrayString &) const
|
size_t GetISPNames(class wxArrayString &) const
|
||||||
{ return 0; }
|
{ return 0; }
|
||||||
|
|
||||||
// sometimes the built-in logic for determining the online status may fail,
|
// 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
|
// so, in general, the user should be allowed to override it. This function
|
||||||
// allows to forcefully set the online status - whatever our internal
|
// allows to forcefully set the online status - whatever our internal
|
||||||
@@ -175,7 +175,7 @@ private:
|
|||||||
int m_CanUsePing;
|
int m_CanUsePing;
|
||||||
/// The path to ping program
|
/// The path to ping program
|
||||||
wxString m_PingPath;
|
wxString m_PingPath;
|
||||||
|
|
||||||
/// beacon host:
|
/// beacon host:
|
||||||
wxString m_BeaconHost;
|
wxString m_BeaconHost;
|
||||||
/// beacon host portnumber for connect:
|
/// beacon host portnumber for connect:
|
||||||
@@ -209,7 +209,7 @@ private:
|
|||||||
int CheckPing(void);
|
int CheckPing(void);
|
||||||
/// Check by connecting to host on given port.
|
/// Check by connecting to host on given port.
|
||||||
int CheckConnect(void);
|
int CheckConnect(void);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -270,7 +270,7 @@ wxDialUpManagerImpl::wxDialUpManagerImpl()
|
|||||||
wxChar * hup = wxGetenv(_T("WXDIALUP_HUPCMD"));
|
wxChar * hup = wxGetenv(_T("WXDIALUP_HUPCMD"));
|
||||||
if(dial || hup)
|
if(dial || hup)
|
||||||
SetConnectCommand(dial ? wxString(dial) : m_ConnectCommand,
|
SetConnectCommand(dial ? wxString(dial) : m_ConnectCommand,
|
||||||
hup ? wxString(hup) : m_HangUpCommand);
|
hup ? wxString(hup) : m_HangUpCommand);
|
||||||
}
|
}
|
||||||
|
|
||||||
wxDialUpManagerImpl::~wxDialUpManagerImpl()
|
wxDialUpManagerImpl::~wxDialUpManagerImpl()
|
||||||
@@ -443,17 +443,17 @@ wxDialUpManagerImpl::CheckConnect(void)
|
|||||||
|
|
||||||
if((hp = gethostbyname(m_BeaconHost.mb_str())) == NULL)
|
if((hp = gethostbyname(m_BeaconHost.mb_str())) == NULL)
|
||||||
return 0; // no DNS no net
|
return 0; // no DNS no net
|
||||||
|
|
||||||
serv_addr.sin_family = hp->h_addrtype;
|
serv_addr.sin_family = hp->h_addrtype;
|
||||||
memcpy(&serv_addr.sin_addr,hp->h_addr, hp->h_length);
|
memcpy(&serv_addr.sin_addr,hp->h_addr, hp->h_length);
|
||||||
serv_addr.sin_port = htons(m_BeaconPort);
|
serv_addr.sin_port = htons(m_BeaconPort);
|
||||||
|
|
||||||
int sockfd;
|
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
|
return -1; // no info
|
||||||
}
|
}
|
||||||
|
|
||||||
if( connect(sockfd, (struct sockaddr *) &serv_addr,
|
if( connect(sockfd, (struct sockaddr *) &serv_addr,
|
||||||
sizeof(serv_addr)) >= 0)
|
sizeof(serv_addr)) >= 0)
|
||||||
{
|
{
|
||||||
@@ -522,9 +522,9 @@ wxDialUpManagerImpl::CheckIfconfig(void)
|
|||||||
// dialup device under SunOS/Solaris
|
// dialup device under SunOS/Solaris
|
||||||
rc = strstr(output,"ipdptp") != (char *)NULL;
|
rc = strstr(output,"ipdptp") != (char *)NULL;
|
||||||
#elif defined(__LINUX__) || defined (__FREEBSD__)
|
#elif defined(__LINUX__) || defined (__FREEBSD__)
|
||||||
rc = strstr(output,"ppp") // ppp
|
rc = strstr(output,"ppp") // ppp
|
||||||
|| strstr(output,"sl") // slip
|
|| strstr(output,"sl") // slip
|
||||||
|| strstr(output,"pl") // plip
|
|| strstr(output,"pl"); // plip
|
||||||
#elif defined(__SGI__) // IRIX
|
#elif defined(__SGI__) // IRIX
|
||||||
rc = strstr(output, "ppp"); // PPP
|
rc = strstr(output, "ppp"); // PPP
|
||||||
#endif
|
#endif
|
||||||
@@ -546,7 +546,7 @@ wxDialUpManagerImpl::CheckPing(void)
|
|||||||
{
|
{
|
||||||
if(! m_CanUsePing)
|
if(! m_CanUsePing)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
// First time check for ping location. We only use the variant
|
// First time check for ping location. We only use the variant
|
||||||
// which does not take arguments, a la GNU.
|
// which does not take arguments, a la GNU.
|
||||||
if(m_CanUsePing == -1) // unknown
|
if(m_CanUsePing == -1) // unknown
|
||||||
|
Reference in New Issue
Block a user